3 ms·
How?
by mbrock 11y ago
How?
- 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.