How to use it with react-native-router-flux
See original GitHub issueHi, can you please show an example of how to use your component with react-native-router-flux?
Should I use it like this?
import {Scene, Router} from 'react-native-router-flux';
class App extends React.Component {
render() {
return <Router>
<Scene key="root">
<Scene key="login" component={Login} title="Login"/>
<Scene key="register" component={Register} title="Register"/>
<Scene key="home" component={Home}/>
</Scene>
// Within your render function.
// Include the MessageBar once within your top View element
// Make sure you add the MessageBar at the very bottom of your master component, then it will be displayed over all other components
<MessageBarAlert ref="alert" />
</Router>
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Using react-native-router-flux | by Spencer Carli | Differential
Setup. First thing we'll do is set up our react native project and then install the react-native-router-flux package.
Read more >aksonov/react-native-router-flux: The first declarative ... - GitHub
react -native-router-flux is a different API over react-navigation . It helps users to define all the routes in one central place and navigate...
Read more >react-native-router-flux examples - CodeSandbox
Learn how to use react-native-router-flux by viewing and forking example apps that make use of react-native-router-flux on CodeSandbox.
Read more >React Native - Router - Tutorialspoint
To begin with, we need to install the Router. We will use the React Native Router Flux in this chapter. You can run...
Read more >How to use the react-native-router-flux.Actions.create function ...
How to use the react-native-router-flux.Actions.create function in react-native-router-flux · To help you get started, we've selected a few react-native-router- ...
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 Free
Top 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

@mergemeynard try follow example this https://github.com/aksonov/react-native-router-flux/blob/master/Example/components/MessageBar.js end https://github.com/aksonov/react-native-router-flux/blob/master/Example/Example.js
<Overlay key="overlay"> <Stack ..../> <Scene component={MessageBar} /> </Overlay>im using with react-native-router-flux and have no problems with it
then i call this.props.showAlert( {your alert} ) whenever i need it. not very reduxy but does the job.