React navigation TypeError: undefined is not a function

I am trying to implement interactive navigation in my application, but as soon as I launched a simple example application from the site for interactive navigation (link: https://reactnavigation.org/docs/intro/basic-app ) this error fails:

TypeError: undefined is not a function (evaluating 'arr[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator']()') This error is located at: in SafeView (at withOrientation.js:50) in withOrientation (at Header.js:315) in Header (at withOrientation.js:50) in withOrientation (at CardStack.js:170) in RCTView (at View.js:113) in View (at CardStack.js:397) in RCTView (at View.js:113) in View (at createAnimatedComponent.js:134) in AnimatedComponent (at Card.js:26) in Card (at PointerEventsContainer.js:55) in Container (at CardStack.js:440) in RCTView (at View.js:113) in View (at CardStack.js:370) in RCTView (at View.js:113) in View (at CardStack.js:369) in CardStack (at CardStackTransitioner.js:103) in RCTView (at View.js:113) in View (at Transitioner.js:187) in Transitioner (at CardStackTransitioner.js:55) in CardStackTransitioner (at StackNavigator.js:48) in Unknown (at createNavigator.js:48) in Navigator (at createNavigationContainer.js:205) in NavigationContainer (at renderApplication.js:35) in RCTView (at View.js:113) in View (at AppContainer.js:102) in RCTView (at View.js:113) in View (at AppContainer.js:126) in AppContainer (at renderApplication.js:34) sliceIterator <unknown> <unknown> SafeAreaView.js:190:31 _getSafeAreaStyle SafeAreaView.js:164:38 render SafeAreaView.js:95:26 proxiedMethod createPrototypeProxy.js:44:35 finishClassComponent ReactNativeFiber-dev.js:1721:102 updateClassComponent ReactNativeFiber-dev.js:1713:33 beginWork ReactNativeFiber-dev.js:1833:44 performUnitOfWork ReactNativeFiber-dev.js:2569:33 workLoop ReactNativeFiber-dev.js:2595:141 _invokeGuardedCallback ReactNativeFiber-dev.js:75:23 invokeGuardedCallback ReactNativeFiber-dev.js:49:40 performWork ReactNativeFiber-dev.js:2634:41 scheduleUpdateImpl ReactNativeFiber-dev.js:2768:101 scheduleUpdate ReactNativeFiber-dev.js:2751:38 scheduleTopLevelUpdate ReactNativeFiber-dev.js:3048:91 updateContainer ReactNativeFiber-dev.js:3059:39 render ReactNativeFiber-dev.js:4483:53 renderApplication renderApplication.js:34:4 run AppRegistry.js:117:10 runApplication AppRegistry.js:191:26 __callFunction MessageQueue.js:306:47 <unknown> MessageQueue.js:108:26 __guard MessageQueue.js:269:6 callFunctionReturnFlushedQueue MessageQueue.js:107:17 

This is my code.

 import React from 'react'; import { AppRegistry, Text, } from 'react-native'; import { StackNavigator } from 'react-navigation'; class HomeScreen extends React.Component { static navigationOptions = { title: 'Welcome', }; render() { return <Text>Hello, Navigation!</Text>; } } export const SimpleApp = StackNavigator({ Home: { screen: HomeScreen }, }); AppRegistry.registerComponent('navigation', () => SimpleApp); 

I looked at other requests, but it seems that everyone is having problems with the navigation function, I do not even call the navigation mode. I just want to run the application with navigation. could you help me? Thank you in advance:)

SOLVE!!! if you have the same problem look at this github post https://github.com/react-community/react-navigation/issues/2853

+5
source share

Source: https://habr.com/ru/post/1273054/


All Articles