Skip to content

Commit 8a577a1

Browse files
committed
Passed the start scene as a prop
Means users don't have to edit NavigationProvider - makes the docs simpler to only edit same files as the navigation react sample
1 parent 08e2d38 commit 8a577a1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

NavigationReactMobile/sample/rsc/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const App = async ({url}: any) => {
1313
<title>Navigation React Mobile</title>
1414
</head>
1515
<body>
16-
<NavigationProvider url={url}>
16+
<NavigationProvider url={url} start="people">
1717
<HmrProvider>
1818
<NavigationStack
1919
unmountStyle={[{transform: 'translateX(100%)'}, {transform: 'translateX(0)'}]}

NavigationReactMobile/sample/rsc/src/NavigationProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import stateNavigator from './stateNavigator';
77

88
const historyManager = new MobileHistoryManager(null, '');
99

10-
const NavigationProvider = ({url, children}: any) => {
10+
const NavigationProvider = ({url, start, children}: any) => {
1111
const clientNavigator = useMemo(() => {
1212
historyManager.stop();
1313
const clientNavigator = new StateNavigator(stateNavigator, historyManager);
1414
var {state, data} = clientNavigator.parseLink<any>(url);
1515
const link = clientNavigator.fluent()
16-
.navigate('people')
16+
.navigate(start)
1717
.navigate(state.key, data).url;
1818
clientNavigator.navigateLink(link);
1919
return clientNavigator;

0 commit comments

Comments
 (0)