NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Fix/version update rnw 0.18

Open Viraj-10 opened this issue 3 years ago • 6 comments
trafficstars

Viraj-10 avatar Aug 11 '22 10:08 Viraj-10

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
native-base ✅ Ready (Inspect) Visit Preview Oct 19, 2022 at 10:39AM (UTC)

vercel[bot] avatar Aug 11 '22 10:08 vercel[bot]

@Viraj-10 as mentioned in https://github.com/necolas/react-native-web/issues/2363#issuecomment-1211035445 this PR is a very fragile fix and might break sooner than later. Dripsy and Restyle are handling responsive styles very well, maybe you can adopt their API for native-base in a similar way?

dohomi avatar Aug 15 '22 01:08 dohomi

@dohomi Dripsy and Restyle are indeed very good, but both do not support Server Side Rendering, while NativeBase does, because of this styles implementation. IMO this is a big advantage over other libraries.

efoken avatar Aug 15 '22 07:08 efoken

@efoken I'm not comparing libraries here, I just try to point out that it is an anti pattern and not a future proof solution how this PR handles the incompatibility with react-native-web

dohomi avatar Aug 15 '22 13:08 dohomi

yo, can you refer to this solution? Less fragile but adds an optional extra step for SSR. If this step is not added, things will still work but styles won't be rendered on the server side. Would've done a PR but caught up with other issues. 😬

Also, this approach is not backward compatible so would need a major release. It uses the CSS class approach instead of dataSet prop. https://twitter.com/nishanbende/status/1528410157801058305

Hi @dohomi, This is a temporary fix we pushed out for people who want to try rnw 0.18 and expo SDK 46. We are working on a fix which doesn't rely on the internal implementation of rnw.

Viraj-10 avatar Aug 17 '22 04:08 Viraj-10