|
This is the best short introduction to React that I have seen: https://medium.freecodecamp.com/the-5-things-you-need-to-know-to-understand-react-a1dbd5d114a3#.yqj1k5rdg – ten or fifteen minutes to grasp all the core concepts. (At least, until you start needing to use Redux as well.)
This is a long, detailed and terrifying overview of the different ways this can get its value in different JavaScript contexts: https://github.com/getify/You-Dont-Know-JS/blob/master/this%20%26%20object%20prototypes/ch2.md#lexical-this – worth skimming just to be horrified enough to be glad you found ...
https://medium.com/@housecor/react-binding-patterns-5-approaches-for-handling-this-92c651b5af56#.ayg5z0c8r summarises the five ways to solve the actual problem of this in React components – which is that event-handler functions have it bound wrongly unless you take steps to fix this. (We have been using solution 4, but I am increasingly drawn to concision of solution 5).
|