React-native-router-flux: Cannot read property 'clone' of undefined

Created on 8 Nov 2017  路  1Comment  路  Source: aksonov/react-native-router-flux

I'm trying to add the router-flux into my project. But getting all the time the error below

Version

  • react-native-router-flux v4.0.0-beta.23
  • react-native v0.49.5

My Code

`

import React, {Component} from 'react';
import {
StyleSheet,
Text,
View,
ActivityIndicator,
ListView,
Button,
Image,
TouchableOpacity,
} from 'react-native';

import {
Router,Scene
} from 'react-native-router-flux';

import Splash from './components/Splash';
import LoginScreen from './components/LoginScreen';
import NewsListScreen from './components/NewsListScreen';

export default class Main extends Component {

constructor(props) {
    super(props);

}

render() {

    return (
      <Router>
      <Scene key="root">

      <Scene>
        key="loginscreen"
        component={LoginScreen}
        title="Login"
        initial={true}
        </Scene>
        </Scene>
      </Router>
      );
}

}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'red',
},
});

`

Error

`TypeError: Cannot read property 'clone' of undefined

This error is located at:
in Router (at Main.js:44)
in Main (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)`

Most helpful comment

Your JSX markup is invalid. Check Example project.

>All comments

Your JSX markup is invalid. Check Example project.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

basdvries picture basdvries  路  3Comments

xnog picture xnog  路  3Comments

sreejithr picture sreejithr  路  3Comments

tonypeng picture tonypeng  路  3Comments

YouYII picture YouYII  路  3Comments