The parent component passes data using props and child components emit events to communicate with their parent. The main difference is in line 13 (both gists) On the first variation the component emits an event, but on the second the component is executing the passed function. After the performance results, the handler variation wins by knock-out.

3m read timeFrom itnext.io
Post cover image
Table of contents
Event handling done rightWelcome the test subjectsStart the comparison
2 Comments

Sort: