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: website/blog/2018-04-06-react-navigation-2.0-rc.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The documentation for 2.0 is available at https://reactnavigation.org/
14
14
15
15
We’re bumping the major version because some of the changes in this release are backwards incompatible. That said, this should be a fairly easy upgrade. We are improving React Navigation incrementally because we don't want to leave developers feeling stranded in an old version. If you use React Navigation in a conventional way and don't have any custom navigators, I can't imagine this update would take you more than an hour.
16
16
17
-
This blog post is not a comprehensive changelog - that will come with the 2.0 proper release; the following is a list of the breaking changes, suggestions for how you can update your app to accommodate them, notice of deprecations, and some of my favourite new features.
17
+
This blog post is not a comprehensive changelog - that will come with the 2.0 proper release; the following is a list of the breaking changes, suggestions for how you can update your app to accommodate them, notice of deprecations, and some of my favourite new features.
18
18
19
19
## Breaking changes
20
20
@@ -46,7 +46,7 @@ Rather than opening a drawer with `navigation.navigate(‘DrawerOpen’)`, you c
46
46
47
47
### Navigation actions API overhaul
48
48
49
-
In 1.x, functions on the `navigation` were not contextual - they would be the same regardless of whether your screen was inside of a drawer, a stack, a tab navigator, etc. In 2.0 the functions that are available to you on the `navigation` prop depend on the navigators that it corresponds to. If your screen is inside of both a stack and a drawer navigator, you will have helpers for both -- `push` and `openDrawer`, for example.
49
+
In 1.x, functions on the `navigation` were not contextual - they would be the same regardless of whether your screen was inside of a drawer, a stack, a tab navigator, etc. In 2.0 the functions that are available to you on the `navigation` prop depend on the navigators that it corresponds to. If your screen is inside of both a stack and a drawer navigator, you will have helpers for both -- `push` and `openDrawer`, for example.
50
50
51
51
Given that we only exposed generic helpers (`navigate`, `goBack`) and helpers specific to the stack in 1.x, this would only impact you if you attempted to use the stack helpers from outside of a stack. For example, if you had a tab navigator with a stack in tab A and just a plain screen in tab B, then tried to `push` a route from the screen in tab B, `push` would not be available. Keep this in mind when you update your app if it follows this type of structure.
Copy file name to clipboardExpand all lines: website/blog/2018-05-07-react-navigation-2.0.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ author: Core Team
4
4
authorURL: https://twitter.com/reactnavigation
5
5
---
6
6
7
-
The documentation is now live at https://reactnavigation.org, and v1 lives [here](/docs/en/1.x/getting-started.html).
7
+
The documentation is now live at https://reactnavigation.org, and v1 lives [here](/docs/en/1.x/getting-started.html).
8
8
9
9
## Significant breaking changes
10
10
@@ -38,7 +38,7 @@ It is now easier to create and maintain custom navigators. The new `createNaviga
38
38
39
39
Custom navigators can now provide actions helpers for their screens. For example, the new drawer navigator now allows `props.navigation.openDrawer()` within its screen components.
40
40
41
-
This does not impact most users - you won't need to make any changes for this unless you use custom navigators in your app. Read more about the changes in [RFC 2](https://github.com/react-navigation/rfcs/blob/master/text/0002-navigator-view-api.md). Also read the [custom navigators documentation](/docs/en/custom-navigators.html). You can also watch the ["Creating a navigator" section in this talk](https://youtu.be/wJJZ9Od8MjM?t=1215) to learn more.
41
+
This does not impact most users - you won't need to make any changes for this unless you use custom navigators in your app. Read more about the changes in [RFC 2](https://github.com/react-navigation/rfcs/blob/master/text/0002-navigator-view-api.md). Also read the [custom navigators documentation](/docs/en/custom-navigators.html). You can also watch the ["Creating a navigator" section in this talk](https://youtu.be/wJJZ9Od8MjM?t=1215) to learn more.
42
42
43
43
## Trivial breaking changes
44
44
@@ -52,7 +52,7 @@ Rather than opening a drawer with `navigation.navigate(‘DrawerOpen’)`, you c
52
52
53
53
In practice, this change is unlikely to impact your app at all except for one case that is mentioned below.
54
54
55
-
In 1.x, functions on the `navigation` were not contextual - they would be the same regardless of whether your screen was inside of a drawer, a stack, a tab navigator, etc. In 2.0 the functions that are available to you on the `navigation` prop depend on the navigators that it corresponds to. If your screen is inside of both a stack and a drawer navigator, you will have helpers for both -- `push` and `openDrawer`, for example.
55
+
In 1.x, functions on the `navigation` were not contextual - they would be the same regardless of whether your screen was inside of a drawer, a stack, a tab navigator, etc. In 2.0 the functions that are available to you on the `navigation` prop depend on the navigators that it corresponds to. If your screen is inside of both a stack and a drawer navigator, you will have helpers for both -- `push` and `openDrawer`, for example.
56
56
57
57
Given that we only exposed generic helpers (`navigate`, `goBack`) and helpers specific to the stack in 1.x, this would only impact you if you attempted to use the stack helpers from outside of a stack. For example, if you had a tab navigator with a stack in tab A and just a plain screen in tab B, then tried to `push` a route from the screen in tab B, `push` would not be available. Keep this in mind when you update your app if it follows this type of structure.
58
58
@@ -66,11 +66,11 @@ This change was intended to simplify the implementation of actions. We may go ba
66
66
67
67
If you are using `NavigationActions.push` or other stack-specific actions, you’ll need to import `StackActions` and use `StackActions.push` instead.
68
68
69
-
## Deprecations
69
+
## Deprecations
70
70
71
71
### XNavigator(...) is now createXNavigator(...)
72
72
73
-
`StackNavigator`, `TabNavigator` and `DrawerNavigator` are now deprecated in favour of `createStackNavigator`, `createTabNavigator`, and `createDrawerNavigator`, which are functionally identical but more clearly communicate that they are functions and that they return a component. The `XNavigator` style will removed in 3.0.
73
+
`StackNavigator`, `TabNavigator` and `DrawerNavigator` are now deprecated in favour of `createStackNavigator`, `createTabNavigator`, and `createDrawerNavigator`, which are functionally identical but more clearly communicate that they are functions and that they return a component. The `XNavigator` style will removed in 3.0.
0 commit comments