Maximum call stack size exceeded in react native

2.6k views Asked by At

I am using react native and everything was working fine until I introduced following libs in package.json

    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-3": "^6.24.1",

Also updated .babelrc

{
  "presets": ["es2015", "react-native", "babel-preset-stage-3"]
}

But now I m receiving Maximum call stack size exceeded while running application. I added above dependencies to get async/await functions.

My package.json looks like this

{
  "name": "pilbara_weed_management_mobile",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-3": "^6.24.1",
    "react": "16.0.0-alpha.12",
    "react-native": "0.47.2",
    "react-native-root-toast": "^1.3.0",
    "react-native-smart-splash-screen": "^2.3.5",
    "react-native-snackbar-dialog": "^1.3.0",
    "react-navigation": "^1.0.0-beta.11"
  },
  "devDependencies": {
    "babel-jest": "20.0.3",
    "babel-preset-react-native": "3.0.1",
    "jest": "20.0.4",
    "react-test-renderer": "16.0.0-alpha.12"
  },
  "jest": {
    "preset": "react-native"
  }
}

I am still getting same error even after removing dependencies. Any idea what went wrong? enter image description here

1

There are 1 answers

0
Mohamed Khalil On

some of these are included already by react & react-native and makes an infinite loop also async/await functions is included in react native without adding extra dependencies