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

Created on 15 Jun 2018  路  1Comment  路  Source: aksonov/react-native-router-flux

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 => (



);

Most helpful comment

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

>All comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

willmcclellan picture willmcclellan  路  3Comments

fgrs picture fgrs  路  3Comments

basdvries picture basdvries  路  3Comments

xnog picture xnog  路  3Comments

tonypeng picture tonypeng  路  3Comments