|
|
|
|
|
by joerick
656 days ago
|
|
Biggest functional difference is that Vue's reactivity is built on Proxy objects, which lets you simply bind your view layer to your model layer and things just keep in sync, without any extra APIs to think about. React has useState which gives you a setter that you need to use with an entirely new object each time. In Vue you can just change a property deep inside the model layer and the view updates. That's what's keeping me in Vue primarily. I think MobX does something similar in React but the API is clunkier than Vue. On top of that, the API is just much nicer. None of the confusing functional language and concepts e.g. "what exactly did the programmer intend by this 'useEffect' call??" |
|
I never used vue for production apps, but my feeling tells me this could be a problem when the app becomes big. If you change a prop deep inside the model layer the chances of triggering an unintentional view update are higher? By using setters, you're essentially creating a more structured and controlled way of updating your application's state. But I have the react googles on, maybe I am missing something :)