Skip to content
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

Erro: [react-native-router-flux] Router should contain only one scene, please wrap you scenes with root Scene #3085

Closed
BrNogueira opened this issue Jun 15, 2018 · 1 comment

Comments

@BrNogueira
Copy link

BrNogueira commented Jun 15, 2018

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0 beta.31
    react-native-cli: 2.0.1

Expected behaviour

that the router could be accessed by my app!

Actual behaviour

My code

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

import FormLogin from './Components/FormLogin';
import FormCadastro from './Components/FormCadastro';

export default props => (



);
@Blapi
Copy link
Collaborator

Blapi commented Jun 18, 2018

There's no code to watch actually.

Moreover, the error message is clear enough, there should be one wrapper inside of your Router like this :

<Router>
  <Stack key='root'>
    <Scene />
    <Scene />
    <Scene />
    <Scene />
    <Scene />
  </Stack>
</Router>

Check the Example project for more infos

@Blapi Blapi closed this as completed Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants