
22 min
React Myths And Legends
The talks explore various misleading patterns and concepts in React, that seem to be “common knowledge”, but which a lot (if not most) developers either get wrong or are just not aware of those. Some examples, covered in the talk (and more):
* that “react component re-renders when its props change” (this is not true)
* that wrapping a component in React.memo will prevent its re-render (not always true)
* that use of Context causes re-renders and is bad for performance (not always true, sometimes Context can actually reduce the number of re-renders in the app)
* that creating an element like this `const A =
<
Child /
>
` is when the Child's render lifecycle is triggered (not true)
* that “react component re-renders when its props change” (this is not true)
* that wrapping a component in React.memo will prevent its re-render (not always true)
* that use of Context causes re-renders and is bad for performance (not always true, sometimes Context can actually reduce the number of re-renders in the app)
* that creating an element like this `const A =
<
Child /
>
` is when the Child's render lifecycle is triggered (not true)