Updated every so often for code that I come across
Disclaimer: I am did not develop this language in any way shape or form and I am simply explaining what everything is to the best of my knowledge. Just like you, I am also learning.
- Called at the end of every render()
- A good place to load in data, and call setState() to re-render the page with the new information
arrowFunction = ( ) =>”hello”
- Not necessarily a React ONLY component, because it is used across all of js. Since there are a lot of component inside component code, and calling other functions, I have seen it a lot within React.
- the purpose of the arrow is to ensure that the correct “this” is being called
- The object of where the function was being called will be referred to as “this”, rather than the potential of returning null if not bound correctly with “bind”.
- arrow function could cause slower rendering because a new function needs to be created
This is a work in progress…
If this has helped you can any way, please 👏to support!
Some Good Resources:
- To Understand what REALLY happens to your React Components: The (new) React lifecycle methods in plain, approachable language
last updated: May 12th, 2020