lelandrichardson / react-primitives

Primitive React Interfaces Across Targets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StyleRegistry import is broken for web (react-native-web) since v0.0.100

MoOx opened this issue · comments

This commit necolas/react-native-web@43d297b is changing some imports.
So now this

const StyleRegistry = require('react-native-web/dist/apis/StyleSheet/registry');
is broken.

I will try to push a fix asap.

Why is resolve being added to the StyleSheet export anyway?

resolve can be handy when you play with the limite of react-primitives and wants to make a custom component (web in my case).
Are you open for a PR to RNW to add it like you mentioned?

is there anything you can't do with createElement + StyleSheet?

I guess so. I initially wanted to use react-primitives directly but the project is probably not mature enough. Will go back to RNW directly.

Oh I see. Yeah I'm not sure if primitives should augment StyleSheet. If you need to do custom web stuff it's probably best to switch over to RNW, as you would RN for custom native. But hopefully this is something we'll all figure out as we go

fixed in v0.5.0