using UNSAFE_componentWillMount in strict mode
Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
- Move code with side effects to componentDidMount, and set initial state in the constructor.
Please update the following components: SideEffect(NullComponent2)
any fix for this warning???
After some extensive debugging of the code, I've determined that componentWillMount in the Dispatcher.tsx file is firing after the init when using this package in a NextJS project. This causes the helmetInstances object to be removed and never gets applied. This is the only reason no one is able to use this package for client side <head> updates in NextJS's new App routing! I'm guessing this affects other similar frameworks as well.
As per the 6 year old note in the code
// componentWillMount will be deprecated
// for SSR, initialize on first render
// constructor is also unsafe in StrictMode
Can that simply be removed entirely?
(side note: componentDidUpdate never even fires)