dowjones/react-dropdown-tree-select

React 18 Strict mode warning: "Using UNSAFE_xxxxx in strict mode is not recommended and may indicate bugs in your code."

salehmdev opened this issue · 3 comments

Describe the bug
When upgrading to React 18, 2 warnings in the console seem to be caused by this package while using Strict mode. From personal usage, the warnings that I see are:

  • "Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code."
  • "Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code."

To Reproduce

Expected behavior

  • Support for strict mode in React 18+.
  • No errors/warnings showing up in the console when on React version 18+.

Screenshots
image

Environment (please complete the following information):

  • Browser: Firefox & Chrome
  • OS: Windows

Additional context

  • The origin of this warning message was difficult to diagnose since the warning doesn't mention what exact component the warning is coming from (as you can see from the screenshot). After scouring google search and checking all dependencies, I think I found a relevant issue in this package that might be directly related.
    • Issue #560
      • PS - thank you for providing the React 18 support!
    • There are a few cases of using those UNSAFE_ .. methods in the project, probably not just from this issue.

Yeah, i still have the exact same problem

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

Same issue here