|
|
|
|
|
by kaoD
250 days ago
|
|
Just to clarify: despite its name, React has no reactivity engine at all and re-renders unconditionally on any state changes or parent re-renders. You have to opt-in to prop-diffing conditional re-renders (which I wouldn't call a "reactivity engine" either) per component, via React.memo. And then you also have to opt-in to prop memoization for non-primitives for the prop-diffing not to be useless. These re-renders might not result in any actual DOM changes since there is an additional vDOM diffing step from the resulting render (which, again, I wouldn't call a "reactivity engine"). |
|