Search code examples
firebasereact-nativereact-native-router-flux

Error: [react-native-router-flux] unique key should be defined


    import React from 'react';
    import { Scene, Router,Actions } from 'react-native-router-flux';
    import LoginForm from '../src/LoginForm';
    import EmployeeList from '../src/EmployeeList'
    import EmployeeCreate from '../src/EmployeeCreate'  


    const RouterComponent=()=>{
        return(
            <Router sceneStyle={{paddingTop:55}}>

                    <Scene 
                        key="Login" 
                        component={LoginForm} 
                        title='Login' />   
                    <Scene 
                        key="EmployeeList" 
                        component={EmployeeList} 
                        title='EmployeeList'
                        rightTitle="ADD"
                        onRight={()=>console.log("error")}  />
                    <Scene 
                        Key="EmployeeCreate" 
                        component={EmployeeCreate} 
                        title='Employee'  />       

            </Router>
        );

    export default RouterComponent;

hi guys im getting this error while use router flux for navigation and when i add a third scene just like in the code it shows this error


Solution

  • hi the thing worked when i updated the router flux to 4.0.0