-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Error: [react-native-router-flux] unique key should be defined #2676
Comments
Which version do you use? (in version 4.0.0-beta.24 you need to add a parent Stack with key='root' I think) |
@tevatahiti |
i updated my router flux version to 4.0.0 and used stack to wrap up the scenes now the error is now gone |
@CoderHar show your navigation code please, how do you do it ? |
@CoderHar I see onRight={()=>console.log("error")} in your EmployeeList scene |
@tevatahiti im sorry it was actually used for checking whether the onRight works or not.even if i change onRight to Actions.EmployeeCreate it doesnt work |
Even with Actions.EmployeeCreate() ? Did you try it? |
@CoderHar Show more of your code and the error messages because you don't really help here |
@Blapi see i want to put my navigation to emplyeecreate in theat onRight part but i couldnt do it with Actions.EmployeeCreate so that i put there a console. |
Please @CoderHar, show your exact code and show the error message |
@Blapi Check out the code that i have chenged and the employeeCreate component
export default connect(null,actions )(RouterComponent); |
import React,{Component} from 'react' export default EmployeeCreate; |
@Blapi the error is the Actions.EmployeeCreate is not a function |
key and not Key |
@Blapi could you please be more specific i couldnt get you |
You wrote key with a capital K on your EmployeeCreate scene, it is key with a lowercased k, not a uppercased k (key !== Key) |
really really thank you @Blapi |
@CoderHar no problem, I guess you can close this issue ;) |
@Blapi sure |
@Blapi thank you for help!. As you can see most issues here are not issues, but questions - you may redirect them to stackoverflow and answer there with getting all benefits. Also I can make you collaborator to deal with it if you wish. |
@aksonov yep sure I'd like that ! |
Done. Please be careful with PR merging - the code should be reviewed and tested before |
Sure, btw could you help me with this please ? #2628 , more and more users (like me) would love information about this. We can talk about this in DM on Twitter (@olisturbois) if you want, I already follow you |
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(
}
export default RouterComponent;
The text was updated successfully, but these errors were encountered: