docs: add info about how initial state is handled

This commit is contained in:
satyajit.happy
2019-06-09 20:30:51 +02:00
parent 0514ca7fca
commit 00fdd13356
7 changed files with 15 additions and 15 deletions

View File

@@ -49,7 +49,7 @@ const StackRouter = {
...state.routes,
{
name: action.payload.name,
key: `${name}-${shortid()}`,
key: `${action.payload.name}-${shortid()}`,
},
],
};
@@ -94,7 +94,7 @@ export default function StackNavigator(props: Props) {
border: '1px solid black',
}}
>
{descriptors[route.name].render()}
{descriptors[route.key].render()}
</div>
))}
</div>