Comment

Comment by SamBam

> The third difference is event binding, where in Stencil they promote using arrow functions while React promotes explicit binding using the .bind() function.

Does React really? I haven't used `.bind` in years, even before moving to mostly hooks-based components.

In this React doc [1] it describes .bind as being for ES2015, and recommends arrow functions for ES6, except if it causes optimization issues.

1. https://reactjs.org/docs/faq-functions.html

parent SamBam 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton