lelandrichardson / react-primitives

Primitive React Interfaces Across Targets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-primitives will no longer work with RNW 0.11.2+

momsse opened this issue · comments

Since react-native-web@0.11.2 and further ReactNativeStyleResolver module does not exist anymore and cause react-primitives to crash at the injection step. See necolas/react-native-web#1304 for more info.

It seems that createStyleResolver is a good replacer. At least it works for me ... for now :)

The only workaround that I found for now is to patch the module thanks to patch-package:

src/injection/react-native-web.js#L19

- const StyleRegistry = getDefault(require('react-native-web/dist/cjs/exports/StyleSheet/ReactNativeStyleResolver'))
+ const StyleRegistry = getDefault(require('react-native-web/dist/cjs/exports/StyleSheet/createStyleResolver'))()