Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: undefined is not a function this._children[typeof Symbol === 'function'? Symbol.iterator: '@@iterator']()') #2520

Closed
CarbonC opened this issue Oct 18, 2017 · 8 comments

Comments

@CarbonC
Copy link

CarbonC commented Oct 18, 2017

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.22 (v3 is not supported)
  • react-native v0.49.3

Expected behaviour

Router don't crash

Actual behaviour

Router crash on android when navigating between screens, with error:

TypeError: undefined is not a function this._children[typeof Symbol === 'function'? Symbol.iterator: '@@iterator']()')

It is maybe linked to this:
react-navigation/react-navigation#1777

Steps to reproduce

For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.

  1. Just run any app with StackNavigator and babelrc es2015 and stage-0 presets
@CarbonC
Copy link
Author

CarbonC commented Oct 19, 2017

Tested a little bit more options, it really seems to be a bug inherent to the stack navigator. The tab navigator is working well...

@cmeiller
Copy link

Same here

@cmeiller
Copy link

@CarbonC I solved my problem by importing babel-polyfill, can you try this?

@CarbonC
Copy link
Author

CarbonC commented Oct 19, 2017

Yeah, i just updated the babel-react-native-preset version right now and it fixed it. Thanks!

@CarbonC CarbonC closed this as completed Oct 19, 2017
@sfreeman28
Copy link

sfreeman28 commented Nov 1, 2017

@CarbonC Hi, I just started trying out React and having trouble with Navigation.

I got TabNavigator working, but not StackNavigator.

Can you please state which version of babel-react-native-preset you updated to fix the issue?

For reference these are my versions:

  "name": "SimpleApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.0.0-beta.5",
    "react-native": "0.49.5",
    "react-navigation": "^1.0.0-beta.16"
  },
  "devDependencies": {
    "babel-jest": "21.2.0",
    "babel-preset-react-native": "4.0.0",
    "jest": "21.2.1",
    "react-test-renderer": "16.0.0-beta.5"
  },
  "jest": {
    "preset": "react-native"
  }
}

Thanks

@skicson
Copy link

skicson commented Nov 1, 2017

@sfreeman28 - your error is probably related to this issue.

@sfreeman28
Copy link

@skicson Yea thanks I just saw that Issue report and looks like what I am getting. Thanks for the help

@erichua23
Copy link

npm install --save babel-polyfill

and add

import "babel-polyfill"

to your entry file.

This work for me on Android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants