Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
This repository was archived by the owner on Jun 11, 2026. It is now read-only.

Feature/Maintenance: React.StrictMode Support / Deprecations #605

Closed

Description

React is deprecating a bunch of APIs in favor of new/safer ways to do the same things while being more compatible with the upcoming React Suspense / Async Mode.

It'd be great if ReactXP was compatible with Strict-Mode sooner than later!

Details

My app run flags the following:

  • componentWillMount needs to be moved to: componentDidMount (or getDerivedStateFromProps) Used in:
    • native-common/RootView
    • web/ScrollView
    • web/listAnimations/MonitorListEdits
    • extensions/navigation/src/web/Navigator
  • componentWillReceiveProps needs to be moved to getDerivedStateFromProps Used in:
    • native-common/PopupContainerView
    • native-common/Button
    • native-common/View
    • web/View
    • windows/View
    • web/ViewBase
    • web/ScrollView
    • macos/TextInput
    • native-common/TextInput
    • web/TextInput
    • web/Image
    • web/Animated
    • web/RootView
    • extensions/virtuallistview/src/VirtualListCell
    • extensions/virtuallistview/src/VirtualListView
  • componentWillUpdate needs to move to to componentDidUpdate or getDerivedStateFromProps Used in:
    • native-common/View
    • web/listAnimations/MonitorListEdits
    • common/utils/FocusManager

Docs

Activity

  1. erictraut commented on Jun 19, 2018

    @erictraut
    Contributor

    ReactXP is intended to run with a wide range of RN versions. Our normal way of dealing with deprecated features in RN is to write conditional logic that attempts to use the new API but falls back on the old API if it's not present. I don't think that technique is possible in this case. For this reason, we may need to stick with the current implementation for a while. Presumably, newer versions of RN will continue to support the classical lifetime methods for a long time, since they're used by so much existing code.

  2. fbartho commented on Jun 19, 2018

    @fbartho
    ContributorAuthor

    I’ve been doing some research, and in each case I examined, it’s possible to update the code to be backwards compatible, but requires a mix of tweaks. Since some of the current structure exists to support Animation, in some cases different tweaks will be needed.

    I’ve been swamped at work, but if our launch goes fine, I was going to make a stab at this in July.

  3. erictraut commented on Sep 8, 2018

    @erictraut
    Contributor

    Frederic Barthelemy (@fbartho), any update on this? I'm going to be releasing the next major version of ReactXP soon.

  4. fbartho commented on Sep 8, 2018

    @fbartho
    ContributorAuthor

    Hi Eric Traut (@erictraut)! We just launched TaskRabbit Client, using ReactXP, on the iOS AppStore this past Tuesday.

    I’m currently prepping for Android among other things, but I’m starting so get some of my open source duties done 😉

    No active updates, but I still believe this refactor is necessary. I’d love to collaborate on this one if anyone wants to help out.

    I feel I don’t have the full experience of ReactXP on the web due to all the RN-only libs we ended up pulling in to launch, but I hope going forwards that will change.

  5. erictraut commented on Sep 8, 2018

    @erictraut
    Contributor

    Congrats on the launch! That's no small achievement.

  6. erictraut commented on Mar 9, 2019

    @erictraut
    Contributor

    Closing in favor of new issue #1039.

  7. mikehardy commented on Aug 9, 2019

    @mikehardy
    Contributor

    Eric Traut (@erictraut) this may be worth re-opening with a laser focus on moving to the new APIs. #1039 has 2 PRs associated with it from me now, but they are just handling deprecation warnings / API breaks, they are not handling moving to the recommended new APIs so I don't believe they will actually handle the StrictMode / suspend/async stuff referenced originally here. Or I could be completely mis-reading it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions