React-jsonschema-form: Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended

Created on 3 Jun 2020  路  8Comments  路  Source: rjsf-team/react-jsonschema-form

Hi!

I have an old bug see here but i'm with the last version.

I know that the warning is not raised in production but normally this bug was fixed in the 2.0 version, isn't it ?

I'm only reusing one Form component and only change data and uischema for each schema I have in my multistep form.

Description

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: Form

Version

react: 16.13.1
@rjsf/core: 2.0.1

Cheers,
Yu.

Most helpful comment

All 8 comments

Yes, we still use UNSAFE_componentWillReceiveProps in 2.0 -- the only thing that was fixed was removing a few instances of this method, and mostly just renaming componentWillReceiveProps -> UNSAFE_ componentWillReceiveProps. If you'd like to help with refactoring to remove it, that would be very much appreciated!

I have the same warning.
Would be nice to avoid it.

Is there a PR for this yet?

Hi, I found the same warning.

When can the checkin be expected in a release and will it fix this Issue so that the warning disappears?

Still no fix for this issue?

I think issue is still there. Is there a way to fix it?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

epicfaace picture epicfaace  路  3Comments

mfulton26 picture mfulton26  路  3Comments

norim13 picture norim13  路  3Comments

elyobo picture elyobo  路  3Comments

ClockerZadq picture ClockerZadq  路  3Comments