DEV Community

Discussion on: Why I Converted from Vue to React

Collapse
lukaszahradnik profile image
Lukáš Zahradník

Hi, the code in the first point for Vue isn't equivalent to the React code.

The callback prop in React code is required, as you would get an error otherwise, but you don't have to listen to emitted events in Vue. Also, you can pass callback in Vue via prop the same way you would do in React.

Another thing is the users array. In Vue version the array is bounded to the component instance - every instance has its own array, but in React version the array is shared between component instances.

Collapse
brettfishy profile image
Brett Fisher Author

Good catch, thanks for pointing those out! I'll be sure to update those.