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

Error: Route 'scarlet' should declare a screen. For example: import MyScreen from './MyScreen'; ... scarlet: { screen: MyScreen, } #3001

Closed
AzizUrRehman1 opened this issue Apr 17, 2018 · 3 comments

Comments

@AzizUrRehman1
Copy link

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

import ScarletScreen from './app/ScarletScreen';
import GrayScreen from './app/GrayScreen';

const App = () => {
return (

      <Scene 
        
        key="scarlet"
        Component={ScarletScreen}
        title="Scarlet"
        initial
      />
    
    <Scene 
        key="gray"
        Component={GrayScreen}
        title="Gray"
      />

    </Scene>
  </Router>

);

}

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},

});
export default App;

@Blapi
Copy link
Collaborator

Blapi commented Apr 17, 2018

component React.Component semi-required The Component to be displayed. Not required when defining a nested Scene, see example.

It is component with a lowercased c

@Blapi Blapi closed this as completed Apr 17, 2018
@AzizUrRehman1
Copy link
Author

it' not work

@Blapi
Copy link
Collaborator

Blapi commented Apr 19, 2018

Show you ScarletScreen component code please

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