You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
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!
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
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!
Activity
fbartho commentedon Mar 6, 2020
/cc Robert Murray (@robertmurray)
mikehardy commentedon Mar 7, 2020
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
fbartho commentedon Mar 7, 2020
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!
mikehardy commentedon Mar 26, 2020
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