🌐
GeeksforGeeks
geeksforgeeks.org › reactjs › reactjs-unsafe_componentwillreceiveprops-method
ReactJS UNSAFE_componentWillReceiveProps() Method - GeeksforGeeks
July 27, 2025 - Our state value increments when we click on the button and this updated value is passed as props to another class component PropComponent. Before our PropComponent receives new props, it logs the updated props values on the console through UNSAFE_componentWillReceiveProps(newProps) method.
🌐
React
react.dev › reference › react › Component
Component – React
Despite its naming, UNSAFE_componentWillReceiveProps does not guarantee that the component will receive those props if your app uses modern React features like Suspense.
🌐
React
legacy.reactjs.org › docs › react-component.html
React.Component – React
If you used componentWillReceiveProps ... post about derived state. UNSAFE_componentWillReceiveProps() is invoked before a mounted component receives new props....
🌐
GitHub
github.com › airbnb › react-outside-click-handler › issues › 30
componentWillReceiveProps warning in React 16.9.0 · Issue #30 · airbnb/react-outside-click-handler
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode.
🌐
GitHub
github.com › ag-grid › ag-grid › issues › 3482
componentWillReceiveProps is no longer recommended and has been renamed · Issue #3482 · ag-grid/ag-grid
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate.
🌐
GitHub
github.com › moroshko › react-autosuggest › issues › 670
Warning about `componentWillReceiveProps` in React 16.9.0 · Issue #670 · moroshko/react-autosuggest
August 14, 2019 - * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode.
Author   ChrisWiles
🌐
GitHub
github.com › facebook › react › issues › 27161
Bug: [React 18] componentWillReceiveProps causes Suspense to go into an infinite loop with React.lazy · Issue #27161 · facebook/react
July 27, 2023 - An adjacent component that uses UNSAFE_componentWillReceiveProps and setState inside of it can cause a component to be unable to render. This seems to only be an issue in React 18. React version: 18.2.0 suspense-bug.mp4 Steps ...
Author   bengoh-retool
🌐
DeepScan
deepscan.io › docs › rules › react-uninvoked-unsafe-lifecycle
Unsafe legacy lifecycle methods of a React class ...
This rule applies when the unsafe ... componentWillReceiveProps(), and componentWillUpdate() were marked as unsafe by adding the prefix UNSAFE_, like USAFE_componentWillMount()....
🌐
GitHub
github.com › rjsf-team › react-jsonschema-form › issues › 1794
Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended · Issue #1794 · rjsf-team/react-jsonschema-form
June 3, 2020 - index.js:1 Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code.
Author   yudao
Find elsewhere
🌐
TutorialsPoint
tutorialspoint.com › reactjs › reactjs_unsafe_componentwillreceiveprops_method.htm
Understanding ReactJS unsafe_componentWillReceiveProps Method
UNSAFE_componentWillReceiveProps is an old React lifecycle function that is called when a component is going to receive new props from its parent. It is used to respond to prop changes by comparing the new props to the existing ones.
🌐
Medium
medium.com › @tomaszkudliski › componentwillreceiveprops-to-react-hook-bda7e261680a
componentWillReceiveProps in React Hook | by Tomasz Kudlinski | Medium
May 9, 2020 - Sometimes logic inside of UNSAFE_componentWillReceiveProps function will check the current and next value of the propA, like here:
🌐
Eslint-react
eslint-react.xyz › docs › rules › no-unsafe-component-will-receive-props
no-unsafe-component-will-receive-props | ESLint React
December 25, 2024 - Using unsafe lifecycle methods like UNSAFE_componentWillReceiveProps makes your component's behavior less predictable and more likely to cause bugs.
🌐
Stack Overflow
stackoverflow.com › questions › 73165374 › warning-using-unsafe-componentwillreceiveprops
reactjs - Warning: Using UNSAFE_componentWillReceiveProps - Stack Overflow
bundle.js:110595 Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate.
🌐
Stack Overflow
stackoverflow.com › questions › 68741431 › what-is-nextprops-in-unsafe-componentwillreceiveprops-and-convert-it-into-react
reactjs - What is nextprops in UNSAFE_componentWillReceiveProps and convert it into React Hook Functional component? - Stack Overflow
UNSAFE_componentWillReceiveProps(nextProps) { let oldGroupList = (this.props.contentMultiaction && this.props.contentMultiaction.groups) || []; let newGroupList = nextProps.contentMultiaction?.groups || []; if (oldGroupList.length !== newGroupList.length) { this.getShownGroups(nextProps); } this.checkAllGroupsState(nextProps); }
🌐
DEV Community
dev.to › tkudlinski › unsafecomponentwillreceiveprops-in-react-hooks-world-172k
componentWillReceiveProps / UNSAFE_componentWillReceiveProps in React Hooks world - DEV Community
May 7, 2020 - Sometimes logic inside of UNSAFE_componentWillReceiveProps function will check the current and next value of the propA, like here:
🌐
GitHub
github.com › Yoast › wordpress-seo › issues › 19867
Warning: componentWillReceiveProps has been renamed, and is not recommended for use · Issue #19867 · Yoast/wordpress-seo
February 14, 2023 - Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate.
🌐
ITNEXT
itnext.io › react17-or-how-to-get-rid-of-componentwillreceiveprops-c91f9a6f6f03
React17, or how to get rid of “componentWillReceiveProps”? | by Giedrius Vičkus | ITNEXT
January 4, 2021 - We can rename lifecycle events to UNSAFE_componentWillMount, UNSAFE_componentWillReceiveProps, UNSAFE_componentWillUpdate and hope that nothing will break, once v17 is out there.