You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warning: componentWillReceiveProps has been renamed #3720
Reacted by Florian Verdonck, Jack Swiggett, Benoît Garreau, s100, Kim, Yunjung, Alexandr Motuzov, Sander, Alessio Di Crescenzo, Andreas, Hoang Dinh and 42 more
react-dom.development.js:11494 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
* Move data fetching code or side effects to componentDidUpdate.
* 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. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
Please update the following components: Select
Reacted by Moritz Limbach, Indra Susila, Abdullah Saud, 陈子云, Jingzhou5433, Nicat, Nicolás Ferreyra, sebastianwolfea, Alauddin Afif Cassandra, Abdelfattah Hezema and 17 more
Reacted by Benjamin van der Burgh and Tericrook
Reacted by Indra Susila, Osman Cansız, Engezielithon, Jonathan Cavalcante, rsha256, Tericrook and Fajar Panca
@rachelleahr Pull request #3716 fixes it and is merged, but I don't know when it will be released.
Reacted by Benjamin Mosnier, Timmy Chang, Lexie Gaines-Smith, Valerie, ryjiang, Micah Bales, Alessio Di Crescenzo, Thomas Mauduit-Blin, Jeff Turley, Chris Russell-Walker and 4 more
Reacted by Florian Verdonck, ChuckByram, Rachel (Delman) Rabinowitz, Valerie, ryjiang, Micah Bales, Alessio Di Crescenzo, Jeff Turley, Chris, Krzysztof Grys and 10 more
I'm not happy about it either. I'm just using this to make the warning go away until the maintainers in this lib sort this out. I'm going to continue to monitor the threads and switch back to the real package once this one is ready.
Everything we need to make this warning go away exists. We just need the maintainers of this lib to press some buttons.
Reacted by Matt Popovich, Paul Riding, Jose Alejandro Cardona, Grégoire Le Cun, GergelyM, Elmar Zander, Glenn 'devalias' Grant, Ismael Barrios R and Andrea
Reacted by Moritz Limbach, Marcelo Kanzaki and Dak Clawson
Looks like there are still some React Strict Mode warnings being generated as of the latest version today (3.0.8). There's an issue for them here: #3745
Reacted by Simon, Birkan Alp Yaman, Noel , Ed Hepburn, Andrew, SaruTole, Jacob, Markus Ruottu and Glenn 'devalias' Grant
With the release of React 16.3, some new lifecycle methods have been introduced, and release of React 17 will deprecate some lifecycle method.
getDerivedStateFromProps is one of those newly introduced lifecycle method replacing componentWillReceiveProps, which has now become UNSAFE_componentWillReceiveProps.
Solution: rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps or use getDerivedStateFromProps but this option will need refactoring your code. prefect solutuon: do not use classes
index.js:1 Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
Move data fetching code or side effects to componentDidUpdate.
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
Please update the following components: AutosizeInput, Select
Reacted by Luan Costa, Kalle, Eugene T, rromikas, Glenn 'devalias' Grant, Sergio Cuadros, Vítor and Md Ohidul Islam TuTuL
These warnings are appearing because you are running in <React.StrictMode>.
create-react-app v3.4.1 enabled <React.StrictMode> by default. It was released about one month ago.
This issue was closed because it was resolved for the case where strict mode is not enabled.
There is currently a rewrite in progress to remove these deprecated lifecycle methods.
Reacted by HeikkiMoilanen1, Glenn 'devalias' Grant, Jeff Puckett, Egor, Saúl de León Guerrero, Nikita Korshunov, Darko, Jonas A, Eugene, Clark Winters and 12 more
Thank you to everyone who has provided information above.
As you may be aware, this bug has been reported multiple times as per issue #4094. On behalf of the maintainers I apologise it's taken awhile to get to this.
A new master issue #4094 has since been created to help keep track of this bug going forward.
This new issue will exist as the source of truth going forward to investigate the issue, report findings, and implement a bug fix.
We'll take into account all the details above while investigating.
If you feel this issue has been wrongly closed as it isn't related to the new master issue #4094, please let us know and we'll take another look.
Activity
eugene-tea commentedon Aug 16, 2019
jakeboone02 commentedon Aug 16, 2019
This is fixed by #3487.
NordlingDev commentedon Aug 23, 2019
@jakeboone02 - I'm on version 3.0.4 and it still warns about this. I can even see it being used in the source code?
oscarteg commentedon Aug 23, 2019
@NordlingDev That is because @jakeboone02 references a pullrequest but the pullrequest is not merged yet.
rachelleahr commentedon Aug 23, 2019
Any idea when this will be merged? trying to remove these warnings...
oscarteg commentedon Aug 23, 2019
@rachelleahr Pull request #3716 fixes it and is merged, but I don't know when it will be released.
absenteerealitycheck commentedon Aug 29, 2019
Any news on when this will be released?
rachelleahr commentedon Aug 29, 2019
@gwyneplaine When is the next release planned?
dbsimeonov commentedon Sep 3, 2019
Does anybody know what is the solution for it? Still having this warning
isggwp commentedon Sep 18, 2019
it fixed? but I have installed react 16.9.0 and react-select 3.0.4 using NPM. and I still got the warning
Kiyozz commentedon Sep 18, 2019
Not fixed atm
yanlee26 commentedon Sep 18, 2019
1
ranneyd commentedon Sep 19, 2019
+1
ranneyd commentedon Sep 20, 2019
Everyone retweet this lmao
https://twitter.com/dustinpkane/status/1174838579056394241
ranneyd commentedon Sep 25, 2019
So I'm going to drop this here.
https://www.npmjs.com/package/react-select-temp
I'm not happy about it either. I'm just using this to make the warning go away until the maintainers in this lib sort this out. I'm going to continue to monitor the threads and switch back to the real package once this one is ready.
I just took this PR, published to NPM, then updated this lib to use that one.
JedWatson/react-input-autosize#167
Everything we need to make this warning go away exists. We just need the maintainers of this lib to press some buttons.
8 remaining items
mreishus commentedon Oct 24, 2019
Looks like there are still some React Strict Mode warnings being generated as of the latest version today (3.0.8). There's an issue for them here: #3745
An1mus commentedon Dec 11, 2019
+1
vedees commentedon Dec 24, 2019
With the release of React 16.3, some new lifecycle methods have been introduced, and release of React 17 will deprecate some lifecycle method.
getDerivedStateFromProps is one of those newly introduced lifecycle method replacing componentWillReceiveProps, which has now become UNSAFE_componentWillReceiveProps.
Solution: rename
componentWillReceivePropstoUNSAFE_componentWillReceivePropsor use getDerivedStateFromProps but this option will need refactoring your code. prefect solutuon: do not use classesljharb commentedon Dec 24, 2019
Note that renaming to "UNSAFE_" is a breaking change since it drops support for < 16.3.
JanaSundar commentedon Apr 16, 2020
Getting this warning in version 3.1.0
index.js:1 Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
Please update the following components: AutosizeInput, Select
luanfelipecosta commentedon Apr 17, 2020
Why the issue is closed then? Im still getting error in 3.1.0.
AbelFuentes commentedon Apr 19, 2020
3.1.0 and still with issues...
razh commentedon Apr 19, 2020
<React.StrictMode>.<React.StrictMode>by default. It was released about one month ago.bladey commentedon Jun 18, 2020
Hi all,
Thank you to everyone who has provided information above.
As you may be aware, this bug has been reported multiple times as per issue #4094. On behalf of the maintainers I apologise it's taken awhile to get to this.
A new master issue #4094 has since been created to help keep track of this bug going forward.
This new issue will exist as the source of truth going forward to investigate the issue, report findings, and implement a bug fix.
We'll take into account all the details above while investigating.
If you feel this issue has been wrongly closed as it isn't related to the new master issue #4094, please let us know and we'll take another look.
Again, thank you.
mihailsitnic commentedon Aug 21, 2020
Try to replace ur
index.jsfileFrom:
ReactDOM.render( <React.StrictMode> <App /> </React.StrictMode>, document.getElementById('root') );To:
ReactDOM.render(<App />, document.getElementById('root'));Or:
ReactDOM.render( <Provider store={store}> <App /> </Provider>, document.getElementById('root') )tomsarduy commentedon Mar 21, 2023
Happy 2023... any news on this? 👀
Methuselah96 commentedon Mar 21, 2023
It should be fixed in the latest version of react-select.