yep, hope we can get an example for react-native-web.
i think cause by react-native version, there are too much red warning when use this in react-native-web.
I'm not sure if this is responsive to the issue, but we've been experimenting with react-native-web and found that while create-react-app will helpfully alias react-native-web, many react-native packages are not distributed in compiled form. For example, react-native-paper appears to work fairly well with react-native-web but can't be easily added to a create-react-app project. To fix this issue and allow continued experimentation, we forked create-react-app 2.1.1 and extended the webpack config to compile react-native-* packages in node_modules with the full suite of transforms, including JSX and stripping flow types. You can now easily get started consuming other react-native projects within a create-react-app by bootstrapping your app with the command (assuming you use npm 5.2+):
npx create-react-app --scripts-version=react-scripts-for-react-native-web my-app
More information here:
In the next few weeks we're hoping to create an example using more react-native-paper components.
NOTE: I also posted this as https://github.com/necolas/react-native-web/issues/1192
Most helpful comment
I'm not sure if this is responsive to the issue, but we've been experimenting with react-native-web and found that while create-react-app will helpfully alias react-native-web, many react-native packages are not distributed in compiled form. For example, react-native-paper appears to work fairly well with react-native-web but can't be easily added to a create-react-app project. To fix this issue and allow continued experimentation, we forked create-react-app 2.1.1 and extended the webpack config to compile
react-native-*packages innode_moduleswith the full suite of transforms, including JSX and stripping flow types. You can now easily get started consuming other react-native projects within a create-react-app by bootstrapping your app with the command (assuming you use npm 5.2+):More information here:
In the next few weeks we're hoping to create an example using more react-native-paper components.
NOTE: I also posted this as https://github.com/necolas/react-native-web/issues/1192