I'm trying to add the router-flux into my project. But getting all the time the error below
`
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',
},
});
`
`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)`
Your JSX markup is invalid. Check Example project.
Most helpful comment
Your JSX markup is invalid. Check Example project.