DEV Community

Discussion on: React vs Vue: Passing Functions to Child Components vs Emitting Events

Collapse
 
quyetnc profile image
quyet

Yeah both React or Vue are able to deliver same thing. But what I want to mention here is about the flavor of using event-driven approach here making code looks cleaner more reasonable.

The Vue's way always make sure Child components are not coupling to the parent in a way calling parent methods where React's way allowed that to happened.

It's worth to note that event naming convention in Vue is also important because it's quite easy to make naming mistake for forks comming from React world. But the design intension is clearly different, Vue is more close to the way native HTML tag communicate and React is a bit weird where it allows child component calling parent methods via props.