DEV Community

Discussion on: 10 Things NOT To Do When Building React Applications

Collapse
 
amcsi profile image
Attila Szeremi⚡

For #6, aren't we supposed to use getDerivedStateFromProps()? That way the logic would only be needed there, and wouldn't need to be repeated in the constructor.