DEV Community

Discussion on: 📖 History of "Stop unnecessary re-rendering component in React !!"

Collapse
 
alienjedi profile image
Andrews Kangah

I think there's problem with React.memo example. Change determination function should be like the following instead...
return nextProps.value !== prevProps.value

Not like the following...
return nextProps.value === prevProps.value

Because it should re-render only when old value not equal to new value