import {AppRegistry} from 'react-native';
import {buildNavigationScheme} from './builder';
// Names should be unique
const screens = [
{
name: 'route1',
screen: Screen1,
},
{
name: 'route2',
screen: Screen2,
},
]
const flow = [
{
name: 'flow1',
screens: ['route1', 'route2'],
// optional
// adding a param makes available for the screens:
// props.screenProps: { setParam, param, rawSetState }
params: [
{
name: 'email',
initialValue: '',
}
],
}
]
// These will be available to the screen, regardles
// of the situation (being in a flow, in the home, etc)
const edges = [
{
from: 'route1',
to: 'route2',
identifier: 'goToRoute2',
},
{
from: 'route2',
to: 'flow1',
identifier: 'goToRoute2',
},
]
const home = {
type: 'bottomTabs',
screens: ['route1', 'route2'],
}
const app = createAppContainer(buildNavigationScheme(home, screens, flows, edges);
AppRegistry.registerComponent(appName, () => app);
henriquekano/ReactNativeStoryboardExample
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published