Skip to content

Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your codeΒ #659

@AshrinJose

Description

@AshrinJose
  • [X ] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

React warning for UNSAFE_componentWillReceiveProps should be gone.

Current Behavior

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: AutoPlay, ReactSwipableView

Steps to Reproduce (for bugs)

  1. update react version to latest code
  2. download the latest react-swipeable-views and react-swipeable-views-utils
  3. write code to show a swipeable images/...
  4. check the development console

Context

Got React Error in development console about breaking code

Your Environment

| react-swipeable-views | ^0.14.0 |
| React | ^17.0.2 |

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions