xinthink / react-native-material-kit

Bringing Material Design to React Native
https://rnmk.xinthink.com
MIT License
4.83k stars 577 forks source link

[Q] design problem. Can I leverge RNMK with react-native-web #392

Closed vladp closed 6 years ago

vladp commented 6 years ago

I am adding a capability to run my react-native app on a web browser. Leveraging the https://github.com/necolas/react-native-web

Right from start, getting some errors (although, they seem to be more ES6 related, not platform specific)

For example Failed to compile.

./node_modules/react-native-material-kit/lib/mdl/RangeSlider.js 112:18-26 '../theme' does not contain an export named 'getTheme'.

Has anybody had experience/success using RNMK with react-native-web Is that even doable?

thank you

vladp commented 6 years ago

FYI, I tried my best to convert RNMK to run as a library within a react app with React Native Web as a replacement for React Native.

Passed compilation stage (which was mostly about ES5/ES6), but React Native Web does not implement a shim/proxy for requireNativeComponent. And does not plan to. (see https://github.com/necolas/react-native-web/issues/507 )

Will need to take RNMK out, unfortunately, of my app (may be I can figure out a way to keep it with shims, for RN portion, at least)

In case anybody is interested here is my conversion effort diff https://github.com/vladp/react-native-material-kit