Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UNSAFE_componentWillReceiveProps console error #804

Closed
adi518 opened this issue Jul 11, 2021 · 4 comments
Closed

UNSAFE_componentWillReceiveProps console error #804

adi518 opened this issue Jul 11, 2021 · 4 comments
Assignees
Labels

Comments

@adi518
Copy link

adi518 commented Jul 11, 2021

Describe the bug
Deprecated lifecycle console error. It seems like some dependency components may need upgrading.

To Reproduce
Open the palette.

Expected behavior
No errors in console.

Desktop (please complete the following information):

  • OS: macOS 11.4
  • Browser Chrome
  • Version 91.0.4472.114

Additional context

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.
* 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://reactjs.org/link/derived-state

Please update the following components: Autosuggest, Autowhatever

That leads to a react-autosuggest issue: moroshko/react-autosuggest#624. Apparently fixed and merged (moroshko/react-autosuggest#681), but seems like they haven't released a new version since then. I'll leave this issue open until they release the fix. In case they release it and you don't want to wait for a new release from this package, use the resolve option in package.json to resolve the new version.

@asabaylus asabaylus self-assigned this Jul 12, 2021
@asabaylus asabaylus added the bug label Jul 12, 2021
@asabaylus
Copy link
Owner

asabaylus commented Jul 22, 2021

@adi518 I've created a simple example you can reference. Please note that I cannot reproduce your issue. Can you publish an example of your code that causes the error message?

@asabaylus
Copy link
Owner

Closing unable to reproduce

@adi518
Copy link
Author

adi518 commented Jul 27, 2021

Sorry for the delayed response.

@adi518 react-command-palette is on react-autosuggest v10.0.1. I've been unable to reproduce your error, we can continue to troubleshoot you issue outside this repo

I realized what the actual issue is. I'm using React 17 in strict mode, so moroshko/react-autosuggest#624 is not really relevant. As for react-autosuggest version. Their latest version is 10.1.0. GitHub collapses the last three releases in their repository, so you can miss it. I'm not saying it will fix it (it won't), but might consider upgrading to latest.

The relevant react-autosuggest issue is this: moroshko/react-autosuggest#624. Probably applicable to react-autowhatever as well.

IMO, leave this one open until they provide a fix for it.

@asabaylus
Copy link
Owner

@adi518 I routinely update all dependencies. As soon as the react-autosuggest team pushes a fix I’ll bump my package.json. There will be a new issue for that so I’ll leave this closed for now. Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants