3 ms·
Used bind a whole bunch in the knockout days and you will still find bind in a lot of todays react docs if I’m not mistaken.
by code_runner 4y ago
Used bind a whole bunch in the knockout days and you will still find bind in a lot of todays react docs if I’m not mistaken.
- acemarke 4y agoDefinitely not "a lot" - searching the existing docs, I see a mention in the FAQ at https://reactjs.org/docs/faq-functions.html#how-do-i-bind-a-function-to-a-component-instance https://reactjs.org/docs/faq-functions.html#how-do-i-bind-a-... , but not really elsewhere. Also, the new React beta docs at https://beta.reactjs.org https://beta.reactjs.org teach function components rather than classes, and thus there's no use of `.bind()` at all.