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
// render the navigator UI using the state and descriptors
99
103
// use actions to perform navigation and emitter to emit events
@@ -129,9 +133,9 @@ The `createStandardNavigator` function accepts three generic arguments:
129
133
};
130
134
```
131
135
132
-
-**`MyTabNavigatorProps`**
136
+
-**`MyTabNavigatorProps & MyTabMapperProps`**
133
137
134
-
The type of any additional props accepted by the navigator.
138
+
The type of any additional public props accepted by the navigator as well as mapper props, i.e. optional props derived from react navigation's state and action helpers.
135
139
136
140
The callback receives `state`, `descriptors`, `actions`, and `emitter` from the navigation library integration:
The `createStandardNavigationFactories` function accepts two generic arguments:
285
+
The `createStandardNavigationFactories` function accepts up to three generic arguments:
279
286
280
287
- The type bag for the navigator (e.g. `MyTabTypeBag`), which includes the state, action helpers, screen options, event map, and router options types.
281
-
- The type of any additional props accepted by the navigator (e.g. `MyTabNavigatorProps`).
288
+
- The type of public props accepted by the navigator (e.g. `MyTabNavigatorProps`). These props are exposed to users in the static config and dynamic navigator component.
289
+
- The optional type of props derived from react navigation's state and action helpers in the mapper function (e.g. `MyTabMapperProps`). These props are passed to the standard navigator but aren't exposed to users.
282
290
283
291
It accepts 3 arguments:
284
292
285
293
- The standard navigator component.
286
294
- The router factory function from React Navigation (e.g. `TabRouter`, `StackRouter`, etc.).
287
-
- An optional function to map `{ navigation, state }` to custom props for the navigator component, in case you need any specific state or action helpers not available in the standard ones.
295
+
- An optional function to map `{ navigation, state }` to props for the navigator component, in case you need any specific state or action helpers not available in the standard ones.
288
296
289
297
It returns an object with `createNavigator` and `createScreen` functions that can be used to create the navigator and screens for React Navigation. These should be exported from the entry point.
// render the navigator UI using the state and descriptors
99
103
// use actions to perform navigation and emitter to emit events
@@ -129,9 +133,9 @@ The `createStandardNavigator` function accepts three generic arguments:
129
133
};
130
134
```
131
135
132
-
-**`MyTabNavigatorProps`**
136
+
-**`MyTabNavigatorProps & MyTabMapperProps`**
133
137
134
-
The type of any additional props accepted by the navigator.
138
+
The type of any additional public props accepted by the navigator as well as mapper props, i.e. optional props derived from react navigation's state and action helpers.
135
139
136
140
The callback receives `state`, `descriptors`, `actions`, and `emitter` from the navigation library integration:
The `createStandardNavigationFactories` function accepts two generic arguments:
281
+
The `createStandardNavigationFactories` function accepts up to three generic arguments:
275
282
276
283
- The type bag for the navigator (e.g. `MyTabTypeBag`), which includes the state, action helpers, screen options, event map, and router options types.
277
-
- The type of any additional props accepted by the navigator (e.g. `MyTabNavigatorProps`).
284
+
- The type of public props accepted by the navigator (e.g. `MyTabNavigatorProps`). These props are exposed to users in the static config and dynamic navigator component.
285
+
- The optional type of props derived from react navigation's state and action helpers in the mapper function (e.g. `MyTabMapperProps`). These props are passed to the standard navigator but aren't exposed to users.
278
286
279
287
It accepts 3 arguments:
280
288
281
289
- The standard navigator component.
282
290
- The router factory function from React Navigation (e.g. `TabRouter`, `StackRouter`, etc.).
283
-
- An optional function to map `{ navigation, state }` to custom props for the navigator component, in case you need any specific state or action helpers not available in the standard ones.
291
+
- An optional function to map `{ navigation, state }` to props for the navigator component, in case you need any specific state or action helpers not available in the standard ones.
284
292
285
293
It returns an object with `createNavigator` and `createScreen` functions that can be used to create the navigator and screens for React Navigation. These should be exported from the entry point.
0 commit comments