react-router 6.4.4 → 6.4.5-pre.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 +10 -3
- package/dist/index.js +20 -20
- package/dist/index.js.map +1 -1
- package/dist/lib/components.d.ts +7 -7
- package/dist/lib/hooks.d.ts +11 -11
- package/dist/main.js +1 -1
- package/dist/react-router.development.js +20 -20
- package/dist/react-router.development.js.map +1 -1
- package/dist/react-router.production.min.js +1 -1
- package/dist/react-router.production.min.js.map +1 -1
- package/dist/umd/react-router.development.js +20 -20
- package/dist/umd/react-router.development.js.map +1 -1
- package/dist/umd/react-router.production.min.js +1 -1
- package/dist/umd/react-router.production.min.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 6.4.5-pre.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies:
|
|
8
|
+
- `@remix-run/router@1.0.5-pre.0`
|
|
9
|
+
|
|
3
10
|
## 6.4.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -55,6 +62,6 @@ Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs ov
|
|
|
55
62
|
|
|
56
63
|
- `@remix-run/router@1.0.0`
|
|
57
64
|
|
|
58
|
-
[rr-docs]: https://reactrouter.com
|
|
59
|
-
[rr-feature-overview]: https://reactrouter.com/
|
|
60
|
-
[rr-tutorial]: https://reactrouter.com/
|
|
65
|
+
[rr-docs]: https://reactrouter.com
|
|
66
|
+
[rr-feature-overview]: https://reactrouter.com/start/overview
|
|
67
|
+
[rr-tutorial]: https://reactrouter.com/start/tutorial
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React Router v6.4.
|
|
2
|
+
* React Router v6.4.5-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -263,7 +263,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
263
263
|
* Returns the full href for the given "to" value. This is useful for building
|
|
264
264
|
* custom links that are also accessible and preserve right-click behavior.
|
|
265
265
|
*
|
|
266
|
-
* @see https://reactrouter.com/
|
|
266
|
+
* @see https://reactrouter.com/hooks/use-href
|
|
267
267
|
*/
|
|
268
268
|
|
|
269
269
|
function useHref(to, _temp) {
|
|
@@ -302,7 +302,7 @@ function useHref(to, _temp) {
|
|
|
302
302
|
/**
|
|
303
303
|
* Returns true if this component is a descendant of a <Router>.
|
|
304
304
|
*
|
|
305
|
-
* @see https://reactrouter.com/
|
|
305
|
+
* @see https://reactrouter.com/hooks/use-in-router-context
|
|
306
306
|
*/
|
|
307
307
|
|
|
308
308
|
function useInRouterContext() {
|
|
@@ -316,7 +316,7 @@ function useInRouterContext() {
|
|
|
316
316
|
* "routing" in your app, and we'd like to know what your use case is. We may
|
|
317
317
|
* be able to provide something higher-level to better suit your needs.
|
|
318
318
|
*
|
|
319
|
-
* @see https://reactrouter.com/
|
|
319
|
+
* @see https://reactrouter.com/hooks/use-location
|
|
320
320
|
*/
|
|
321
321
|
|
|
322
322
|
function useLocation() {
|
|
@@ -329,7 +329,7 @@ function useLocation() {
|
|
|
329
329
|
* Returns the current navigation action which describes how the router came to
|
|
330
330
|
* the current location, either by a pop, push, or replace on the history stack.
|
|
331
331
|
*
|
|
332
|
-
* @see https://reactrouter.com/
|
|
332
|
+
* @see https://reactrouter.com/hooks/use-navigation-type
|
|
333
333
|
*/
|
|
334
334
|
|
|
335
335
|
function useNavigationType() {
|
|
@@ -340,7 +340,7 @@ function useNavigationType() {
|
|
|
340
340
|
* This is useful for components that need to know "active" state, e.g.
|
|
341
341
|
* <NavLink>.
|
|
342
342
|
*
|
|
343
|
-
* @see https://reactrouter.com/
|
|
343
|
+
* @see https://reactrouter.com/hooks/use-match
|
|
344
344
|
*/
|
|
345
345
|
|
|
346
346
|
function useMatch(pattern) {
|
|
@@ -360,7 +360,7 @@ function useMatch(pattern) {
|
|
|
360
360
|
* Returns an imperative method for changing the location. Used by <Link>s, but
|
|
361
361
|
* may also be used by other elements to change the location.
|
|
362
362
|
*
|
|
363
|
-
* @see https://reactrouter.com/
|
|
363
|
+
* @see https://reactrouter.com/hooks/use-navigate
|
|
364
364
|
*/
|
|
365
365
|
function useNavigate() {
|
|
366
366
|
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
@@ -411,7 +411,7 @@ const OutletContext = /*#__PURE__*/React.createContext(null);
|
|
|
411
411
|
/**
|
|
412
412
|
* Returns the context (if provided) for the child route at this level of the route
|
|
413
413
|
* hierarchy.
|
|
414
|
-
* @see https://reactrouter.com/
|
|
414
|
+
* @see https://reactrouter.com/hooks/use-outlet-context
|
|
415
415
|
*/
|
|
416
416
|
|
|
417
417
|
function useOutletContext() {
|
|
@@ -421,7 +421,7 @@ function useOutletContext() {
|
|
|
421
421
|
* Returns the element for the child route at this level of the route
|
|
422
422
|
* hierarchy. Used internally by <Outlet> to render child routes.
|
|
423
423
|
*
|
|
424
|
-
* @see https://reactrouter.com/
|
|
424
|
+
* @see https://reactrouter.com/hooks/use-outlet
|
|
425
425
|
*/
|
|
426
426
|
|
|
427
427
|
function useOutlet(context) {
|
|
@@ -439,7 +439,7 @@ function useOutlet(context) {
|
|
|
439
439
|
* Returns an object of key/value pairs of the dynamic params from the current
|
|
440
440
|
* URL that were matched by the route path.
|
|
441
441
|
*
|
|
442
|
-
* @see https://reactrouter.com/
|
|
442
|
+
* @see https://reactrouter.com/hooks/use-params
|
|
443
443
|
*/
|
|
444
444
|
|
|
445
445
|
function useParams() {
|
|
@@ -452,7 +452,7 @@ function useParams() {
|
|
|
452
452
|
/**
|
|
453
453
|
* Resolves the pathname of the given `to` value against the current location.
|
|
454
454
|
*
|
|
455
|
-
* @see https://reactrouter.com/
|
|
455
|
+
* @see https://reactrouter.com/hooks/use-resolved-path
|
|
456
456
|
*/
|
|
457
457
|
|
|
458
458
|
function useResolvedPath(to, _temp2) {
|
|
@@ -474,7 +474,7 @@ function useResolvedPath(to, _temp2) {
|
|
|
474
474
|
* elements in the tree must render an <Outlet> to render their child route's
|
|
475
475
|
* element.
|
|
476
476
|
*
|
|
477
|
-
* @see https://reactrouter.com/
|
|
477
|
+
* @see https://reactrouter.com/hooks/use-routes
|
|
478
478
|
*/
|
|
479
479
|
|
|
480
480
|
function useRoutes(routes, locationArg) {
|
|
@@ -738,7 +738,7 @@ var DataRouterStateHook;
|
|
|
738
738
|
})(DataRouterStateHook || (DataRouterStateHook = {}));
|
|
739
739
|
|
|
740
740
|
function getDataRouterConsoleError(hookName) {
|
|
741
|
-
return hookName + " must be used within a data router. See https://reactrouter.com/
|
|
741
|
+
return hookName + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
|
|
742
742
|
}
|
|
743
743
|
|
|
744
744
|
function useDataRouterContext(hookName) {
|
|
@@ -932,7 +932,7 @@ function RouterProvider(_ref) {
|
|
|
932
932
|
/**
|
|
933
933
|
* A <Router> that stores all entries in memory.
|
|
934
934
|
*
|
|
935
|
-
* @see https://reactrouter.com/
|
|
935
|
+
* @see https://reactrouter.com/router-components/memory-router
|
|
936
936
|
*/
|
|
937
937
|
function MemoryRouter(_ref2) {
|
|
938
938
|
let {
|
|
@@ -973,7 +973,7 @@ function MemoryRouter(_ref2) {
|
|
|
973
973
|
* able to use hooks. In functional components, we recommend you use the
|
|
974
974
|
* `useNavigate` hook instead.
|
|
975
975
|
*
|
|
976
|
-
* @see https://reactrouter.com/
|
|
976
|
+
* @see https://reactrouter.com/components/navigate
|
|
977
977
|
*/
|
|
978
978
|
function Navigate(_ref3) {
|
|
979
979
|
let {
|
|
@@ -1008,7 +1008,7 @@ function Navigate(_ref3) {
|
|
|
1008
1008
|
/**
|
|
1009
1009
|
* Renders the child route's element, if there is one.
|
|
1010
1010
|
*
|
|
1011
|
-
* @see https://reactrouter.com/
|
|
1011
|
+
* @see https://reactrouter.com/components/outlet
|
|
1012
1012
|
*/
|
|
1013
1013
|
function Outlet(props) {
|
|
1014
1014
|
return useOutlet(props.context);
|
|
@@ -1017,7 +1017,7 @@ function Outlet(props) {
|
|
|
1017
1017
|
/**
|
|
1018
1018
|
* Declares an element that should be rendered at a certain URL path.
|
|
1019
1019
|
*
|
|
1020
|
-
* @see https://reactrouter.com/
|
|
1020
|
+
* @see https://reactrouter.com/components/route
|
|
1021
1021
|
*/
|
|
1022
1022
|
function Route(_props) {
|
|
1023
1023
|
process.env.NODE_ENV !== "production" ? invariant(false, "A <Route> is only ever to be used as the child of <Routes> element, " + "never rendered directly. Please wrap your <Route> in a <Routes>.") : invariant(false) ;
|
|
@@ -1030,7 +1030,7 @@ function Route(_props) {
|
|
|
1030
1030
|
* router that is more specific to your environment such as a <BrowserRouter>
|
|
1031
1031
|
* in web browsers or a <StaticRouter> for server rendering.
|
|
1032
1032
|
*
|
|
1033
|
-
* @see https://reactrouter.com/
|
|
1033
|
+
* @see https://reactrouter.com/router-components/router
|
|
1034
1034
|
*/
|
|
1035
1035
|
function Router(_ref4) {
|
|
1036
1036
|
let {
|
|
@@ -1098,7 +1098,7 @@ function Router(_ref4) {
|
|
|
1098
1098
|
* A container for a nested tree of <Route> elements that renders the branch
|
|
1099
1099
|
* that best matches the current location.
|
|
1100
1100
|
*
|
|
1101
|
-
* @see https://reactrouter.com/
|
|
1101
|
+
* @see https://reactrouter.com/components/routes
|
|
1102
1102
|
*/
|
|
1103
1103
|
function Routes(_ref5) {
|
|
1104
1104
|
let {
|
|
@@ -1261,7 +1261,7 @@ function ResolveAwait(_ref7) {
|
|
|
1261
1261
|
* either a `<Route>` element or an array of them. Used internally by
|
|
1262
1262
|
* `<Routes>` to create a route config from its children.
|
|
1263
1263
|
*
|
|
1264
|
-
* @see https://reactrouter.com/
|
|
1264
|
+
* @see https://reactrouter.com/utils/create-routes-from-children
|
|
1265
1265
|
*/
|
|
1266
1266
|
|
|
1267
1267
|
|