4 ms·
>but the whole ES6 thing is a mess that breaks a bunch of other things (notably autobinding this). That's trivial to fix...
by coldtea 11y ago
>but the whole ES6 thing is a mess that breaks a bunch of other things (notably autobinding this).
That's trivial to fix...
- mbrock 11y agoHow?
- acemarke 11y agoUse one of the community-built subclasses of React.Component that provide auto-binding, like https://github.com/philpl/react-compat-component https://github.com/philpl/react-compat-component, or a utility function that's a one-line call like https://github.com/cassiozen/React-autobind https://github.com/cassiozen/React-autobind.