React-native-paper: Add react-native-web to our example

Created on 22 Nov 2018  路  2Comments  路  Source: callstack/react-native-paper

help wanted

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 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

All 2 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kpervin picture kpervin  路  3Comments

tonyxiao picture tonyxiao  路  3Comments

alikazemkhanloo picture alikazemkhanloo  路  4Comments

talaikis picture talaikis  路  3Comments

scottybo picture scottybo  路  3Comments