Upgrade to v5.2.1 or higher and this open issue should be fixed yarn upgrade -L react-helmet

I think you need 16.3.1 or later, possibly 16.3.3

Answer from Nipun Ravisara on Stack Overflow
🌐
React
legacy.reactjs.org › docs › react-component.html
React.Component – React
This method doesn’t have access to the component instance. If you’d like, you can reuse some code between getDerivedStateFromProps() and the other class methods by extracting pure functions of the component props and state outside the class definition.
🌐
React
legacy.reactjs.org › blog › 2018 › 06 › 07 › you-probably-dont-need-derived-state.html
You Probably Don't Need Derived State – React Blog
June 7, 2018 - For a long time, the lifecycle componentWillReceiveProps was the only way to update state in response to a change in props without an additional render. In version 16.3, we introduced a replacement lifecycle, getDerivedStateFromProps to solve the same use cases in a safer way.
Discussions

reactjs - what's the use of getDerivedStateFromProps (or how do you fire it?) - Stack Overflow
I have the following 'List' component where I'm trying to update this.state from props. I can't seem to get getDrivedStateFromProps to work correctly with componentDidUpdate. There's a problem wit... More on stackoverflow.com
🌐 stackoverflow.com
Discussion: componentWillReceiveProps vs getDerivedStateFromProps
Hello We have found a scenario where the removal of componentWillReceiveProps will encourage us to write worse code than we currently do. We currently consider props to be a valid form of input and state for our component. If a component... More on github.com
🌐 github.com
97
March 28, 2018
When should i use getDerivedStateFromProps?
https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html#when-to-use-derived-state More on reddit.com
🌐 r/reactjs
4
6
January 17, 2019
How does `static getDerivedStateFromProps` work?

React always knows exactly what component instance it's currently rendering. But, in order to prevent potentially problematic usage patterns, yes, the getDerivedStateFromProps lifecycle method must be defined as static, so you cannot reference this inside. You're supposed to only look at the (latestProps, latestState) parameters, and determine what state updates if any are needed.

More on reddit.com
🌐 r/reactjs
3
2
October 31, 2018
🌐
GitHub
github.com › facebook › react › issues › 13505
getDerivedStateFromProps - responding to change in props · Issue #13505 · facebook/react
August 29, 2018 - The documentation states This method exists for rare use cases where the state depends on changes in props over time However, having read through #12188, it appears the only way to achieve this (checking props against prevProps to respon...
Author   Billy-
🌐
GeeksforGeeks
geeksforgeeks.org › reactjs › react-js-static-getderivedstatefromprops
React.js static getDerivedStateFromProps() - GeeksforGeeks
July 23, 2025 - The getDerivedStateFromProps method is a static lifecycle method used when the state of a component depends on changes of props.
🌐
Rheinwerk Computing
blog.rheinwerk-computing.com › the-component-lifecycle-in-react
The Component Lifecycle in React
March 19, 2025 - The method is used to determine if the props have changed and if the state needs to be adjusted. In the getDerivedStateFromProps method, you have access to the props and the state object.
🌐
TutorialsPoint
tutorialspoint.com › article › reactjs-getderivedstatefromprops-method
ReactJS – getDerivedStateFromProps() Method
March 18, 2021 - : null} ); } } class Show extends React.Component { constructor() { super(); this.state = { email: '', }; } static getDerivedStateFromProps(props, state) { console.log('getDerivedStateFromProps method is called'); return { email: props.email }; } render() { return (
Find elsewhere
🌐
TutorialsPoint
tutorialspoint.com › home › reactjs › reactjs getderivedstatefromprops method
ReactJS getDerivedStateFromProps Method
February 13, 2026 - In the above example, The Form component has a user ID and an email input. When the user ID changes, the getDerivedStateFromProps function resets the email. The function handleUserIDChange simulates a user ID change. The App component sets the Form and manages changes to the user ID.
🌐
GitHub
github.com › reactjs › react.dev › issues › 721
Discussion: componentWillReceiveProps vs getDerivedStateFromProps · Issue #721 · reactjs/react.dev
March 28, 2018 - static getDerivedStateFromProps(nextProps, prevState){ if (this.state.visible === true && newProps.visible === false) { registerLog('dialog is hidden'); } return { visible : nextProps.visible }; } Aside from already duplicating the props, in my opinion this will heavily encourage users to do ·
Author   arieh
🌐
React
react.dev › reference › react › Component
Component – React
If you need to “adjust” some state when a prop changes, check whether you can compute all the necessary information from props alone during rendering. If you can’t, use static getDerivedStateFromProps instead.
🌐
W3Schools
w3schools.com › react › react_class.asp
React Class Components
The example below has a button that changes the favorite color to blue, but since the getDerivedStateFromProps() method is called, which updates the state with the color from the favcol attribute, the favorite color is still rendered as yellow:
🌐
Medium
medium.com › swlh › lifecycle-state-and-getderivedstatefromprops-761b3a19c4e
Lifecycle, state, getDerivedStateFromProps and Hooks | by Thomas Rubattel | The Startup | Medium | The Startup
December 17, 2022 - Lifecycle, state, getDerivedStateFromProps and Hooks Introduction React 16.3 introduced a new lifecycle function called getDerivedStateFromProps. This new lifecycle function is meant as replacement …
🌐
DhiWise
dhiwise.com › post › best-practices-for-using-getderivedstatefromprops-in-your-react-applications
The Role of getDerivedStateFromProps in the React
October 27, 2023 - The getDerivedStateFromProps method takes two parameters: nextProps and prevState. nextProps is an object representing the new props that the component is receiving, and prevState is an object representing the current state of the component.
🌐
NGCC in Angular Ivy
iq.js.org › questions › react › what-is-the-purpose-of-getderivedstatefromprops-lifecycle-method
What is the purpose of `getDerivedStateFromProps()` lifecycle method?
December 23, 2025 - The new static getDerivedStateFromProps() lifecycle method is invoked after a component is instantiated as well as before it is re-rendered.
🌐
Netlify
niharraoteblog.netlify.app › update-lifecycle-of-a-react-component
Update lifecycle of a class-based React component
This lifecycle hook is invoked after getDerivedStateFromProps and before the render function and allows us to cancel the update process. It can be used to let React know whether the changes in the state or props of the component affect the component's output.
🌐
HackerNoon
hackernoon.com › replacing-componentwillreceiveprops-with-getderivedstatefromprops-c3956f7ce607
Replacing ‘componentWillReceiveProps’ with ‘getDerivedStateFromProps’ | HackerNoon
May 13, 2018 - programming#react#javascript#reactjs#componentwillreceiveprops#getderivedstatefromprops · Arweave · ViewBlock · Terminal · Lite · Coderoad · Devfaq · Thinbug · Errorsbase · Openweaver · Shijianchuo · Hashnode · Digraph · Learnrepo · Openweaver ·