You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versioned_docs/version-8.x/configuring-links.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -998,8 +998,6 @@ function NotFoundScreen({ route }) {
998
998
}
999
999
```
1000
1000
1001
-
When doing server rendering, you'd also want to return correct status code for404errors. See [server rendering docs](server-rendering.md#handling-404-or-other-status-codes) for a guide on how to handle it.
1002
-
1003
1001
## Rendering an initial route
1004
1002
1005
1003
Sometimes you want to ensure that a certain screen will always be present as the first screen in the navigator's state. You can use the `initialRouteName` property to specify the screen to use for the initial screen.
The `ServerContainer` component should wrap your entire app during server rendering. Note that you still need a `NavigationContainer` in your app, `ServerContainer` doesn't replace it.
30
33
31
34
See the [`server rendering guide`](server-rendering.md) for a detailed guide and examples.
32
35
33
-
## Ref
34
-
35
-
If you attach a `ref` to the container, you can get the options for the current screen after rendering the app. The `ref` will contain a method called `getCurrentOptions` which will return an object with options for the focused screen in the navigation tree:
36
-
37
-
```js
38
-
constoptions=ref.current.getCurrentOptions();
39
-
```
40
-
41
-
Then you can access the options for the screen from this object and put it in the HTML:
Note that the `options` object can be undefined if you are not rendering a navigator on the initial render.
49
-
50
36
## Props
51
37
52
38
### `location`
53
39
54
-
Location object containing the location to use for server rendered output. You can pass the `pathname` and `search` properties matching the `location` object in the browsers:
40
+
`URL` object containing the location to use for server rendered output:
0 commit comments