5 ms·
This reminds me of react more than vue. When there is a change, the setup function is executed and the virtual dom of the component is recomputed. You have no
by gemakelijk 11mo ago
This reminds me of react more than vue.
When there is a change, the setup function is executed and the virtual dom of the component is recomputed. You have no choice because it is a return in a function (setup/build).
But in Vue3, if a ref is only used in an html tag the compiler will optimize it to not recalculate the whole virtual dom.
Or shall I say, vue with jsx
- yoyo930021 10mo agoYou’re absolutely right — I haven’t found a good way to make the DOM update at a fine-grained level yet. However, I still believe this framework has value, mainly for the following reasons: 1. The setup function behaves just like in Vue 3 — it runs only once. This helps avoid the mental overhead found in React’s re-renders. 2. Dependency tracking is fully automatic, eliminating the pain of manually managing dependencies as in React or flutter_hooks. 3. By providing a Composition or Hook-style API, it introduces a new way to organize and structure code in Flutter. 4. While fine-grained DOM updates aren’t possible, a ComputedBuilder is provided, allowing developers to easily control the scope of updates when needed.