refactor: discard all routes but last when getting action from state

This commit is contained in:
Satyajit Sahoo
2020-02-14 23:04:09 +01:00
parent c5fcfbd427
commit ac242fd281
5 changed files with 86 additions and 69 deletions

View File

@@ -124,7 +124,8 @@ export default function App() {
prefixes: LinkingPrefixes,
config: {
Root: {
path: 'root',
path: '',
initialRouteName: 'Home',
screens: Object.keys(SCREENS).reduce<{ [key: string]: string }>(
(acc, name) => {
// Convert screen names such as SimpleStack to kebab case (simple-stack)
@@ -135,7 +136,7 @@ export default function App() {
return acc;
},
{}
{ Home: '' }
),
},
},