lelandrichardson / react-primitives

Primitive React Interfaces Across Targets
MIT License
3.09k stars 108 forks source link

Support RNW 0.18, remove StyleSheet.resolve API. Refs #147 #148

Closed badsyntax closed 1 year ago

badsyntax commented 1 year ago

Fixes #147 Fixes #139

This change adds support for RNW 0.18. Refer to #139 for notes on why we should remove the Stylesheet.resolve API.

RNW 0.18 has changed its stylesheet implementation to closely match RN.

That RNW change is required to fix a bug in the emotion library (see https://github.com/emotion-js/emotion/issues/1543).

The final piece of the puzzle is to upgrade react-primitives to support RNW 0.18. The react-primitives upgrade is blocking us from fixing that emotion bug.

badsyntax commented 1 year ago

@mathieudutour @lelandrichardson any chance this can be reviewed and released?

macintoshhelper commented 1 year ago

Thanks for submitting this PR. Won’t this break projects that depend on older versions of RNW (pre 0.18) and depend on StyleSheet.resolve? Maybe a try/catch for the import with some dependency injection would be better?

badsyntax commented 1 year ago

It's been a while since I looked at this and I have moved on from trying to fix the emotion bug. I dislike having to close PR's but I won't be able to contribute any further, I apologise. I'll keep the branch around on my fork for reference.