- With React using JSX and Angular 2 using HTML, there are some differences between the two when it comes to handling DOM events triggered from components.
- While React has mapped props on our JSX components to DOM events, Angular 2 uses the DOM event itself.
- This is because React is registering our handler as the callback for the event while Angular 2 invokes an expression with our component as the context.
- The same happens with Angular 2 except you can change the state directly since the framework is watching the component tree for any changes to its data flow makes it simpler for one to reason about application state, but sometimes you need two-way flow.
- Angular 2 allows you to bind to any event emitted from the component such as Browser Native or Custom Events from the framework.
Which developers do you think would benefit most from this? Angular 2 for ReactJS deverlopers > https://t.co/5qNbEhuVYR
— AngularJS News (@AngularJS_News) July 28, 2017