Open digizeph opened 4 years ago
@JayWebz what's your opinion on this? Should it be a priority to fix?
Looks like they will continue to work for now with React 16.x (16.12 just came out last month), but into React 17, they will need to be updated to at least be UNSAFE methods. React blog says running a command "npx react-codemod rename-unsafe-lifecycles" (change out npx for npm or yarn) will go through a project and rename deprecated components to UNSAFE_componentWill... which will resolve the warning for now. Come react 17, these lifecycle events won't work without the UNSAFE prefix. The exact date for react 17 release isn't known yet it looks like, currently on 16.12. The short term solution of renaming to UNSAFE should probably be implemented sooner than later. The long-term solution of converting things to their new proper lifecycle method should be scheduled to happen but not doing it before 17 is released "shouldn't" break anything.
as a side note, now that React Hooks are released and starting to be more widely adopted, react is starting to hint at transitioning off of class-based components, they are supported just fine for the foreseeable future though.
componentWillMount
componentWillReceiveProps