loading...

re: React Hooks for Vue developers VIEW POST

FULL DISCUSSION
 

Thanks Michael for this article. I'm using Vue and know very little about React and it's interesting to have this perspective.

What you describe is the recommended and most common approach for making a Vue project but it's not the only one !

Some examples :
Vue components can be declared with render functions and do not have to be in their own files :
vuejs.org/v2/guide/render-function...

You can also pass a function as a prop instead of relying on events.

Computed properties are what you want most of the time. But if you need to have more control over caching you are also free to use methods or a combination of methods and state.

Computed properties are not magic, vue registers the other reactive variables your property depends on and will "invalidate the cache" when one of them has changed.

Cheers

code of conduct - report abuse