DEV Community

Discussion on: The Evolution of Signals in JavaScript

 
darrylnoakes profile image
Darryl Noakes

Vue's hook-like Composition API was dead-on-arrival because of it.

I disagree. As Ryan said, the issues with React are the dependency arrays, which are not present in pretty much any other framework, including Vue.
As the Vue docs say (Comparison with React Hooks), the Composition API avoids these issues due to the different reactivity system, how component code is run, and how components are rendered.

Is it possible to get the benefit of signals with normal code, like this.count = this.count + 1 instead of setCount(count() + 1)?

This is the equivalent in Vue's composition API: myThing.value = myThing.value + 1 or myThing.value += 1

Some comments have been hidden by the post's author - find out more