Skip to content

[Improvement Opinion] Move onIndexChanged from UNSAFE_componentWillUpdate to componentDidUpdate #1144

@ovistoica

Description

@ovistoica

Which OS ?

Mac Mojave

Version

Which versions are you using:

  • react-native-swiper 1.6.0-rc.3
  • react-native v0.61.2

Improvement Proposal

This is not an issue per say, but I am wondering, wouldn't it be safer for further react & react native releases to move onIndexChanged from UNSAFE_componentWillUpdate to componentDidUpdate? At the moment, onIndexChanged is the only function used there and most likely, this is going to cause crashes on the next react release

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