filmov
tv
react native web setup - react native app for Web /android/ios - how to run react native app on web
Показать описание
React Native for web setup-
1. Install new dependencies to support react native for web
2. include some new files to run react native app on web
4. Start the app on web as well as android emulator
-----------------------------
Step -1
2. npx react-native run-android
Step - 2
1. npm install react-dom react-native-web --legacy-peer-deps
2. npm install --save-dev babel-plugin-react-native-web babel-plugin-module-resolver --legacy-peer-deps
3. npm i -D babel-plugin-react-native-web webpack webpack-cli webpack-dev-server html-webpack-plugin react-dom babel-loader url-loader @svgr/webpack --legacy-peer-deps
"jest": {
"preset": "react-native-web",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
}
5. include these four files in root folder(project folder) of your project
7. you are all set and now run the app on web with this command
npm run web
#reactnativeweb
build website with react native
react native for web
react native for browser
make a website with react native
single code for three platform web android ios
react native web
react native setup for web
1. Install new dependencies to support react native for web
2. include some new files to run react native app on web
4. Start the app on web as well as android emulator
-----------------------------
Step -1
2. npx react-native run-android
Step - 2
1. npm install react-dom react-native-web --legacy-peer-deps
2. npm install --save-dev babel-plugin-react-native-web babel-plugin-module-resolver --legacy-peer-deps
3. npm i -D babel-plugin-react-native-web webpack webpack-cli webpack-dev-server html-webpack-plugin react-dom babel-loader url-loader @svgr/webpack --legacy-peer-deps
"jest": {
"preset": "react-native-web",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
}
5. include these four files in root folder(project folder) of your project
7. you are all set and now run the app on web with this command
npm run web
#reactnativeweb
build website with react native
react native for web
react native for browser
make a website with react native
single code for three platform web android ios
react native web
react native setup for web
Комментарии