0

I am new to ReactNative world, I am using ReactCLI (No Expo)

My Code running fine on Android Simulator, but don't know why it is not executing on WEB. (See attachment). I am using Windows 10.

Additionally, I got URL (why my code not run in react-native code in web) that saying - It doesn't work. But as per the FACEBOOK guideline "React Native is used to develop applications for Android, iOS, Web and UWP by enabling developers to use React along with native platform capabilities."

So, what I am missing??

Below is my Package.JSON

"scripts": {
    "android": "npx react-native run-android",
    "ios": "react-native run-ios",
    "start": "npx react-native start --reset-cache",
    "test": "jest",
    "lint": "eslint .",
    "build-android": "cd ./android && ./gradlew clean && ./gradlew assembleRelease"
  },
  "pre-commit": [
    "lint"
  ],
  "dependencies": {
    "@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/drawer": "^5.8.0",
    "@react-navigation/native": "^5.4.3",
    "@react-navigation/stack": "^5.4.0",
    "axios": "^0.19.2",
    "react": "16.11.0",
    "react-native": "0.62.2",
    "react-native-gesture-handler": "^1.6.1",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-paper": "^3.10.1",
    "react-native-reanimated": "^1.9.0",
    "react-native-safe-area-context": "^2.0.3",
    "react-native-screens": "^2.8.0",
    "react-native-splash-screen": "^3.2.0",
    "react-native-svg": "^12.1.0",
    "react-native-unimodules": "^0.9.1",
    "react-native-vector-icons": "^6.6.0",
    "react-navigation": "^4.3.9"
  },
  "devDependencies": {
    "@babel/core": "^7.10.0",
    "@babel/runtime": "^7.10.0",
    "@react-native-community/eslint-config": "^1.1.0",
    "babel-jest": "^26.0.1",
    "eslint": "^7.1.0",
    "jest": "^26.0.1",
    "metro-react-native-babel-preset": "^0.59.0",
    "pre-commit": "^1.2.2",
    "react-test-renderer": "16.11.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

3
  • IF you use only React Native I guess you cant expect to run it on the web by default... with Expo its a lot easier Commented Jul 20, 2020 at 6:32
  • Any idea, How can I Run on Web (ReactCLI - No Expo) Commented Jul 21, 2020 at 11:33
  • No just google it - i am always using expo because it is way easier and pretty much can do everything that rn can Commented Jul 21, 2020 at 12:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.