This document compares React and Vue, discusses their pros and cons, and explores reactivity and the use of proxies in Vue. It finds that Vue has an easier learning curve and smaller size than React, but React has a larger ecosystem. Proxies, introduced in ES2015, allow intercepting and customizing default behavior of operations on objects. Vue 3 uses proxies for reactivity which provides better performance than Vue 2. Proxies are also used for change detection in some React libraries, though come with performance caveats.
6. Right tool for the right job
• If you like building apps with templates
(or want the option to)
• If you like simplicity and things that
“just work”
• If you need your application to be as
small and fast as possible
• If you want a library that is adaptable
for both web and native apps
• If you plan to build a large scale app
• If you want the biggest ecosystem
If you’re already happy with one or the other, there’s no need to switch.
https://medium.com/js-dojo/react-or-vue-which-javascript-ui-library-should-you-be-using-543a383608d
7.
8. Experience with frontend frameworks
Angular 1.x - 6 years
Angular 2-6 - 1.5 years
React - 4 months
Vue - 48 hours
9. In a graph
Approx 1425 hours a year
With 261 working days a year = 5.5h hours per work day
17. Approachable, easy to learn
One step away from mobile development (React Native)
Desktop application on all platforms (Proton Native; uses React syntax)
Functional programming benefits (immutability, explicit state management)
Redux
Lot’s of innovation in the community (Relay, Next.js)
Virtual DOM
One-direction data flow
Reuse of components
React pros
18. Alone never enough
- Combining various libraries can be challenging
- Need transpilation, build tools etc.
Redux is verbose
JSX?
High pace of development
- Documentation doesn’t always catch up
- Easy to fall behind
React cons
19. Size 59KB (React: 98KB)
Easy learning curve (also when switching from Angular or React)
Can do both: full SPA and simple components
Best documentation
Great supplement libraries (router, store..)
Template syntax
Vue pros
20. A rather small community development
Language barrier
Too much flexibility?
Vue cons
35. • apply
• construct
• defineProperty
• deleteProperty
• get
• getOwnPropertyDescriptor
• getPrototypeOf
• has
• isExtensible
• ownKeys
• preventExtensions
• set
• setPrototypeOf
Traps
36. • apply - trap for a function call
• construct - trap for the new operator
• defineProperty - trap for Object.defineProperty()
• deleteProperty - trap for the delete operator
• get - trap for getting a property value
• getOwnPropertyDescriptor - trap for Object.getOwnPropertyDescriptor()
• getPrototypeOf - trap for the [[GetPrototypeOf]] internal method
• has - trap for the in operator
• isExtensible - trap for Object.isExtensible()
• ownKeys - trap for Object.keys() and Reflect.ownKeys()
• preventExtensions - trap for Object.preventExtensions()
• set - trap for setting a property value
• setPrototypeOf - trap for Object.setPrototypeOf()
Traps