3 ms·
To be fair, mutating props was frowned upon pretty early on. Also, emphasis on upgrading to the latest version of React 15 before upgrading to React 16. React
by pluma 9y ago
To be fair, mutating props was frowned upon pretty early on. Also, emphasis on upgrading to the latest version of React 15 before upgrading to React 16.
React has pretty thorough deprecation warnings on the final releases of each major version about what is going away with the next major. Once you've gotten rid of all deprecation warnings, migrating to the next major should be uneventful.
This means you can take your sweet time when upgrading, migrating your code without breaking your entire application.
- linkmotif 9y ago> To be fair, mutating props was frowned upon pretty early on. Yeah that’s what I’m saying :)
- danabramov 9y agoThe Discord article authors are incorrect in saying mutating props broke with React 16. What really happened is that they switched from createClass to ES6 classes. ES6 class methods have implicit 'use strict' mode. They weren't forced to switch to ES6 classes if they didn't want to. createClass is on npm (create-react-class) and still works fine.