@remix-run/router 1.1.0-pre.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -21
- package/dist/router.cjs.js +1 -1
- package/dist/router.js +1 -1
- package/dist/router.umd.js +1 -1
- package/dist/router.umd.min.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
# `@remix-run/router`
|
|
2
2
|
|
|
3
|
-
## 1.1.0
|
|
3
|
+
## 1.1.0
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This release introduces support for [Optional Route Segments](https://github.com/remix-run/react-router/issues/9546). Now, adding a `?` to the end of any path segment will make that entire segment optional. This works for both static segments and dynamic parameters.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Optional Params Examples**
|
|
8
|
+
|
|
9
|
+
- Path `lang?/about` will match:
|
|
10
|
+
- `/:lang/about`
|
|
11
|
+
- `/about`
|
|
12
|
+
- Path `/multistep/:widget1?/widget2?/widget3?` will match:
|
|
13
|
+
- `/multistep`
|
|
14
|
+
- `/multistep/:widget1`
|
|
15
|
+
- `/multistep/:widget1/:widget2`
|
|
16
|
+
- `/multistep/:widget1/:widget2/:widget3`
|
|
17
|
+
|
|
18
|
+
**Optional Static Segment Example**
|
|
8
19
|
|
|
9
|
-
|
|
20
|
+
- Path `/home?` will match:
|
|
21
|
+
- `/`
|
|
22
|
+
- `/home`
|
|
23
|
+
- Path `/fr?/about` will match:
|
|
24
|
+
- `/about`
|
|
25
|
+
- `/fr/about`
|
|
10
26
|
|
|
11
27
|
### Minor Changes
|
|
12
28
|
|
|
13
|
-
-
|
|
14
|
-
- You can now denote optional path segments with a `?` as the last character in a path segment
|
|
15
|
-
- Optional params examples
|
|
16
|
-
- `:lang?/about` will get expanded and match:
|
|
17
|
-
- `/:lang/about`
|
|
18
|
-
- `/about`
|
|
19
|
-
- `/multistep/:widget1?/widget2?/widget3?` will get expanded and match:
|
|
20
|
-
- `/multistep/:widget1/:widget2/:widget3`
|
|
21
|
-
- `/multistep/:widget1/:widget2`
|
|
22
|
-
- `/multistep/:widget1`
|
|
23
|
-
- `/multistep`
|
|
24
|
-
- Optional static segment example
|
|
25
|
-
- `/fr?/about` will get expanded and match:
|
|
26
|
-
- `/fr/about`
|
|
27
|
-
- `/about`
|
|
29
|
+
- Allows optional routes and optional static segments ([#9650](https://github.com/remix-run/react-router/pull/9650))
|
|
28
30
|
|
|
29
31
|
### Patch Changes
|
|
30
32
|
|
|
@@ -50,9 +52,10 @@ function Comp() {
|
|
|
50
52
|
}
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
- Fix requests sent to revalidating loaders so they reflect a GET request ([#9660](https://github.com/remix-run/react-router/pull/9660))
|
|
54
55
|
- Persist `headers` on `loader` `request`'s after SSR document `action` request ([#9721](https://github.com/remix-run/react-router/pull/9721))
|
|
55
|
-
-
|
|
56
|
+
- Fix requests sent to revalidating loaders so they reflect a GET request ([#9660](https://github.com/remix-run/react-router/pull/9660))
|
|
57
|
+
- Fix issue with deeply nested optional segments ([#9727](https://github.com/remix-run/react-router/pull/9727))
|
|
58
|
+
- GET forms now expose a submission on the loading navigation ([#9695](https://github.com/remix-run/react-router/pull/9695))
|
|
56
59
|
- Fix error boundary tracking for multiple errors bubbling to the same boundary ([#9702](https://github.com/remix-run/react-router/pull/9702))
|
|
57
60
|
|
|
58
61
|
## 1.0.5
|
package/dist/router.cjs.js
CHANGED
package/dist/router.js
CHANGED
package/dist/router.umd.js
CHANGED
package/dist/router.umd.min.js
CHANGED