Skip to content

Commit a2b63fb

Browse files
committed
Fix typo in blog post
1 parent 556ef6e commit a2b63fb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

blog/2024-03-25-introducing-static-api.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ To solve this, we’re adding a new static API to React Navigation 7. It’s not
1515

1616
:::note
1717

18-
The static API it’s an additional optional API. The dynamic API isn’t going away and will remain a first class API of React Navigation. In fact, the static API is written entirely on top of the dynamic API.
18+
The static API it’s an additional optional API. The dynamic API isn’t going away and will remain a first-class API of React Navigation. In fact, the static API is written entirely on top of the dynamic API.
1919

2020
:::
2121

2222
## Overview
2323

24-
With the dynamic API, first we import a function such as `createStackNavigator`, then we use it to define screens - each screen has a `name` and a `component`:
24+
With the dynamic API, first, we import a function such as `createStackNavigator`, and then we use it to define screens - each screen has a `name` and a `component`:
2525

2626
```js
2727
const Stack = createStackNavigator();
@@ -40,7 +40,7 @@ function RootStack() {
4040
The static API follows the same principles. Here we are specifying screens in a property called `screens`, the name of the screen is a key in the configuration object and the value contains the component to render:
4141

4242
```js
43-
const RootStack = {
43+
const RootStack = createStackNavigator({
4444
screens: {
4545
Home: {
4646
screen: Home,
@@ -52,10 +52,10 @@ const RootStack = {
5252
screen: Settings,
5353
},
5454
},
55-
};
55+
});
5656
```
5757

58-
Then after writing our navigation config, we call `createStaticNavigation` and render the returned the component:
58+
Then after writing our navigation config, we call `createStaticNavigation` and render the returned component:
5959

6060
```js
6161
const Navigation = createStaticNavigation(RootStack);
@@ -153,7 +153,7 @@ See [Configuring links](/docs/7.x/configuring-links?config=static) for more deta
153153

154154
## Authentication Flow
155155

156-
One of the nice things about the dynamic APIs is declarative authentication flow. You declaratively define which screens are available for logged in and guest users, and React Navigation would handle showing the appropriate screens automatically. To keep a similar experience, we added some dynamism to the new static API with the if property:
156+
One of the nice things about the dynamic APIs is the declarative authentication flow. You declaratively define which screens are available for logged-in and guest users, and React Navigation would handle showing the appropriate screens automatically. To keep a similar experience, we added some dynamism to the new static API with the if property:
157157

158158
```js
159159
const RootStack = createNativeStackNavigator({
@@ -190,4 +190,4 @@ yarn add @react-navigation/native@next @react-navigation/native-stack@next
190190

191191
In addition to the static API, React Navigation 7 also includes a lot of other improvements and new features. Make sure to go through the [upgrade guide](/docs/7.x/upgrading-from-6.x) to see all the changes.
192192

193-
We would love to get feedback from the community on how it works for you and catch any issues before the stable release. If you have any feedback or suggestions, please let us know on our [GitHub Discussions forum](https://github.com/react-navigation/react-navigation/discussions). Or if you find any issues, please report them on our [GitHub issues](https://github.com/react-navigation/react-navigation/issues).
193+
We would love to get feedback from the community on how it works for you and catch any issues before the stable release. If you have any feedback or suggestions, please let us know on our [GitHub Discussions forum](https://github.com/react-navigation/react-navigation/discussions). If you find any issues, please report them on our [GitHub issues](https://github.com/react-navigation/react-navigation/issues).

0 commit comments

Comments
 (0)