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: docs/MIGRATION.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
-
# Migrating from 3.x
1
+
##Migrating from 3.x
2
2
3
-
## Breaking changes (compared to v3):
4
3
*`Actions.create` (alternative syntax to define scenes) is not available (for simplicity) - just use `<Router>` as top component for your App. You may wrap it with Redux as well.
5
4
* No `duration`/`panHandlers` support - you have to implement custom navigator now instead and pass it as ‘navigator’ prop
6
5
https://reactnavigation.org/docs/navigators/custom. You could still pass `panHandlers={null}` to disable gestures or `gesturedEnabled={false}`
*`Switch` is removed - you may use onEnter/onExit handlers for more flexible logic.
13
12
*`getSceneStyle` is removed (no needed in v4, you may pass any values to Router now and they will be inherited by all scenes).
14
13
* Custom reducer is supported (`createReducer` prop for Router) but Redux actions now are passed directly from React Navigation (‘Navigation/BACK’, ‘Navigation/NAVIGATE’, etc.)
15
-
* Drawer is 'drawer' attribute Scene
14
+
* Use 'replace' instead of `ActionConst.REPLACE` within Scene declaration
15
+
* Scenes cannot have both 'component' and 'children'
16
+
* Drawer syntax was changed (boolean `drawer` attribute + `contentComponent` for side menu component + `Actions.drawerOpen`/`Actions.drawerClose` to open/close drawer)
16
17
* Modal is 'lightbox' attribute for Scene (used for popups, like Error)
17
18
* Container scenes (that has children) cannot have `component` (or it will be considered as child!). If you want to customize containers, use react navigation custom navigators and pass it as `navigator` prop.
18
19
* No `position` attribute is supported for custom transitions. For vertical transition add `modal` to parent `Scene`.
19
20
* No flux 'focus' actions - use onEnter/onExit handlers instead.
20
21
* tabBarSelectedItemStyle is not supported. Instead please use React Navigation TabBar params for tabs Scene: `activeTintColor`, `inactiveTintColor`, etc (https://reactnavigation.org/docs/navigators/tab)
22
+
* To make multiple pops you could use `Actions.popTo(sceneName)` where sceneName is name of scene you want to see (it should be not container, i.e. scene with `component`)
0 commit comments