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.

React-Native 60, 61, 62 - Compatibility Issues with reactxp 2.0.0 #1187

Open

Description

When upgrading from react-native 0.59 to 0.62 we discovered some breaking API changes that make ReactXP fail to load!

Issue 1: AccessibilityInfo

In react-native 0.60, a breaking change was introduced that deleted the fetch() API and added helpers for granular AccessibilitySettings.

0.59 AccessibilityInfo Docs
0.60 AccessibilityInfo Docs

This manifests in an error on import of "reactxp":

 Test suite failed to run

    TypeError: Cannot read property 'then' of undefined

       8 |  */
       9 | import React from "react";
    > 10 | import * as RX from "reactxp";
         | ^
      11 | 
      12 | export { IntlShape } from "react-intl";
      13 | import {

      at new Accessibility (node_modules/reactxp/dist/native-common/Accessibility.js:41:56)

I think there's a workaround for jest here, of defining fetch() in client-side code.

That however does mean that this API needs significant updates for react-native 0.6* support!

Activity

  1. fbartho commented on Mar 6, 2020

    @fbartho
    ContributorAuthor
  2. mikehardy commented on Mar 7, 2020

    @mikehardy
    Contributor

    I am successfully using react-native 0.61, 0.62 is not released yet but I am not expecting a problem?

    See Discussion and PR here #1126 - which would forward-port to the new API but impacts backwards-compatibility and is not strictly required for reactxp v2 to work with react-native 0.61.5 at least

  3. fbartho commented on Mar 7, 2020

    @fbartho
    ContributorAuthor

    Mike Hardy (@mikehardy) I tested it yesterday on 0.62 and the fetch method wasn’t present (at runtime, at least in jest), so we have to do something. Either detect the new methods and use that, and fallback to fetch for older RN?

    I’ll cross post this to the PR, thanks for pointing it out to me!

  4. mikehardy commented on Mar 26, 2020

    @mikehardy
    Contributor

    Fetch should still be present, it is just a warning now. The types should still have it or they are wrong, IMHO:

    https://reactnative.dev/blog/2020/03/26/version-0.62#other-improvements

    react/react-native@523ab83

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions