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
| reducer | function | | optional user-defined reducer for scenes, you may want to use it to intercept all actions and put your custom logic |
89
-
| createReducer | function | | function that returns a reducer function for {initialState, scenes} param, you may wrap Reducer(param) with your custom reducer, check Flux usage section below|
89
+
| createReducer | function | | function that returns a reducer function for {initialState, scenes} param, you may wrap Reducer(param) with your custom reducer, check Flux usage section below|
90
90
| other props | | | all properties that will be passed to all your scenes |
91
91
| children | | required (if no scenes property passed)| Scene root element |
92
92
| scenes | object | optional | scenes for Router created with Actions.create. This will allow to create all actions BEFORE React processing. If you don't need it you may pass Scene root element as children |
@@ -100,7 +100,7 @@ class App extends React.Component {
100
100
| tabs| bool | false | Defines 'TabBar' scene container, so child scenes will be displayed as 'tabs'. If no `component` is defined, built-in `TabBar` is used as renderer. All child scenes are wrapped into own navbar.
101
101
| initial | bool | false | Set to `true` if this is the initial scene |
102
102
| duration | number | 250 | Duration of transition (in ms) |
103
-
| direction | string | 'horizontal' | direction of animation horizontal/vertical |
103
+
| direction | string | 'horizontal' | direction of animation horizontal/vertical |
104
104
| title | string | null | The title to be displayed in the navigation bar |
105
105
| navBar | React.Component | | optional custom NavBar for the scene. Check built-in NavBar of the component for reference |
106
106
| hideNavBar | bool | false | hides navigation bar for this scene |
@@ -227,7 +227,7 @@ To display a modal use `Modal` as root renderer, so it will render first element
227
227
This component doesn't depend from any redux/flux library. It uses new React Native Navigation API and provide own reducer for its navigation state.
228
228
You may provide own one if you need. To avoid creation of initial state, you may pass reducer creator. Example to print all actions:
229
229
```javascript
230
-
// remember to add the 'Reducer' to your imports along with Router, Scene, ... like so
230
+
// remember to add the 'Reducer' to your imports along with Router, Scene, ... like so
231
231
// import { Reducer } from 'react-native-router-flux'
232
232
constreducerCreate=params=>{
233
233
constdefaultReducer=Reducer(params);
@@ -258,7 +258,7 @@ Following example chooses scene depending from sessionID using Redux:
258
258
```
259
259
260
260
## Drawer (side menu) integration
261
-
Example of Drawer custom renderer based on react-native-drawer. Note that you have to include drawer to static contextTypes of your NavBar to enable show/hide/toggle side menu:
261
+
Example of Drawer custom renderer based on react-native-drawer. Note that the build-in NavBar component supports toggling of drawer. The Drawer implementation just needs to have a function: toggle();
262
262
263
263
```javascript
264
264
importReactfrom'react-native';
@@ -268,7 +268,8 @@ import {DefaultRenderer} from 'react-native-router-flux';
0 commit comments