router-flux-blank-screen showing where initial screen should be
See original GitHub issueVersion
Tell us which versions you are using:
- react-native-router-flux v4.?.? (v3 is not supported)
- react-native v0.54RC
Expected behaviour
Want to display initial screen defined in Routes.js
Actual behaviour
Showing only blank screen with container style inside and top bar colored to green. Routes.js
import React, {Component} from 'react';
import {Router, Stack, Scene} from 'react-native-router-flux';
import Login from './pages/Login';
import SignUp from './pages/SignUp';
export default class Routes extends Component<{}> {
render() {
return (
<Router>
<Stack key="root" hideNavBar={true}>
<Scene key="login" component={Login} title="Přihlášení" initial={true}/>
<Scene key="register" component={SignUp} title="Registrace"/>
</Stack>
</Router>
)
}
}
App.js
`/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
StatusBar,
StyleSheet,
Text,
View
} from 'react-native';
import Routes from './src/Routes';
export default class App extends Component<{}> {
render() {
return (
<View style={styles.container}>
<StatusBar
backgroundColor="#6b9b37"
barStyle="light-content"
/>
<View style={{ flex:1 }}>
<Routes />
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container : {
backgroundColor:'#9ccc65',
flex:1,
alignItems:'center',
alignContent: 'center',
}
});
`
### Steps to reproduce
For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.
1.
2.
3.
<!-- Love react-native-router-flux? Please consider supporting our collective:
👉 https://opencollective.com/react-native-router-flux/donate -->
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
router flux in react native not showing the screen
you don't need to put Stack tag, just put like this. <Router> <Scene key="root" hideNavBar > //put all scene inside it <Scene initial...
Read more >Developers - router-flux-blank-screen showing where initial screen ...
Showing only blank screen with container style inside and top bar colored to green. Routes.js import React, {Component} from 'react'; import {Router, Stack, ......
Read more >react-native-router-flux | Yarn - Package Manager
It helps users to define all the routes in one central place and navigate and communicate between different screens in an easy way....
Read more >react-native-router-flux/CHANGELOG.md - UNPKG
277, - router-flux-blank-screen showing where initial screen should be [\#2909](https://github.com/aksonov/react-native-router-flux/issues/2909).
Read more >React Native Tutorial #5 | Tek Hub - YouTube
React Native - Screen Navigation using react-native- router - flux Useful Books: 1. ... We will help to learn and solve issues in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Or you can do one thing just remove
alignItems:'center',
from style it will fix your problems.This is not working inside View use
return <Routes />
insted of