ReactJS and VueJS are definitely two of the most dominant UI frameworks for web frontend development today. Though evolving from different design patterns and concepts, the two actually share many common solutions that you might think, addressing issues that web developers will face in day-to-day work: data flow, DOM changes, component etc.
Starting from 16.8, ReactJS introduced a series of new API in a functional programing fashion called React Hooks, which allows developer to turn their class-based components into functions. On the other hand, VueJS is working on similar proposal called Composition API in upcoming major release 3.x. By taking a first glance, this move will make the transition between the two frameworks even easier than before.
However, as a majority of projects in VueJS are still in 2.x code base, here we will continue a series of articles to explain how to achieve some of the most widely used scenarios and use cases by resorting above two different approaches: VueJS class component and React Hooks functions.
Part 1: Access DOM
Part 2: Access parent context
Part 3: Props Validation
Part 4: Computation
Part 5: Imperative Programming
Part 6: Closure
Part 7: