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
'Usage of getUrlWithBackToParam function is prohibited. This is legacy code and no new occurrences should be added. Please look into documentation and use alternative routing methods instead.',
266
+
},
262
267
263
268
// These are the original rules from AirBnB's style guide, modified to allow for...of loops and for...in loops
Copy file name to clipboardExpand all lines: contributingGuides/NAVIGATION.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,12 @@ Navigation.goBack();
111
111
> [!NOTE]
112
112
> This function should be used mainly with the `backToRoute` param. If you want to use it, make sure there is a screen to which you should always go back in a given case and pass its route as a param.
113
113
114
-
It also allows dynamic setting of `backToRoute` which is pretty handy when RHP can be opened from multiple pages. Then we should set `backTo` parameter in the URL, so it is possible to go to the previous page even after refreshing! More information on how to use backTo route param can be found [here](#how-to-use-backto-route-param).
114
+
It also allows dynamic setting of `backToRoute` which is pretty handy when RHP can be opened from multiple pages. Then we should set `backTo` parameter in the URL, so it is possible to go to the previous page even after refreshing!
115
+
116
+
> [!WARNING]
117
+
> **Deprecated**: The `backTo` parameter is deprecated and should not be used in new implementations. Most problems that `backTo` solved can be resolved by adding one or more routes for a single screen. If you don't know how to solve your problem, contact someone from the navigation team.
118
+
119
+
More information on how to use backTo route param can be found [here](#how-to-use-backto-route-param).
115
120
116
121
```ts
117
122
// src/pages/NewSettingsScreen.tsx
@@ -431,6 +436,9 @@ The easiest way to find the piece of code from which the navigation method was c
431
436
432
437
## Using`backTo`routeparam
433
438
439
+
> [!WARNING]
440
+
>**Deprecated**: The`backTo`parameterisdeprecatedandshouldnotbeusedinnewimplementations. Mostproblemsthat`backTo`solvedcanberesolvedbyaddingoneormoreroutesforasinglescreen. Ifyoudon't know how to solve your problem, contact someone from the navigation team.
@@ -617,6 +625,9 @@ In the above example, we can see that when building a state from a link leading
617
625
618
626
RHPscreenscanusuallybeopenedfromaspecificcentralscreen. OfcoursetherearecaseswhereoneRHPscreencanbeusedindifferenttabs (thenusing`backTo`parametercomesinhandy). However, mostoftenoneRHPscreenhasaspecificcentralscreenassignedunderneath.
619
627
628
+
> [!WARNING]
629
+
>**Deprecated**: The`backTo`parameterisdeprecatedandshouldnotbeusedinnewimplementations. Mostproblemsthat`backTo`solvedcanberesolvedbyaddingoneormoreroutesforasinglescreen. Ifyoudon't know how to solve your problem, contact someone from the navigation team.
Copy file name to clipboardExpand all lines: contributingGuides/philosophies/ROUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Internet routers and third-party-services can see and store any information in t
43
43
44
44
### - SHOULD NOT use query parameters
45
45
Exceptions:
46
-
- When a URL needs to be encoded and added to the path (eg. `?backTo=URL`, `?forwardTo=URL`)
46
+
- When a URL needs to be encoded and added to the path (eg. `?backTo=URL`, `?forwardTo=URL`) - **Note: `backTo` parameter is deprecated and should not be used in new implementations**
47
47
- When complex data needs to be part of the path (eg. `/search?q=QUERY`)
0 commit comments