Manuel Schiller
190c921726
fix: correctly support to for unions which include the index route / ( #1393 )
...
* fix: correctly support `to` for unions which include the index route `/`
* chore: ignore snapshots from formatting
2024-03-29 23:20:54 +01:00
Tanner Linsley
da949949ab
release: v1.25.1
v1.25.1
2024-03-29 20:01:09 +00:00
Jason Galea
add3bd67d9
fix: prevent props being populated with undefined or empty values ( #1386 )
2024-03-29 20:58:35 +01:00
Tanner Linsley
f9a3973f4a
release: v1.25.0
v1.25.0
2024-03-29 17:05:53 +00:00
Tanner Linsley
482f50d1e7
tests: fix tests
2024-03-29 11:03:44 -06:00
Tanner Linsley
72593f0c2d
feat: experimental codesplitting
2024-03-29 10:49:30 -06:00
Tanner Linsley
527e52d96a
release: v1.24.1
v1.24.1
2024-03-28 22:42:41 +00:00
Sean Cassiere
eb87c1827d
refactor(router-vite-plugin): trigger the route-tree generation using the watchChange hook ( #1378 )
...
* feat(router-vite-plugin): trigger router-generator on all events
* feat: safe-guard against additional future events being added in
* feat(router-vite-plugin): use the watchChange hook to handle the route-tree generation
2024-03-29 11:41:04 +13:00
Tanner Linsley
10b8396c67
release: v1.24.0
v1.24.0
2024-03-28 18:08:09 +00:00
Sean Cassiere
5eba66bb80
feat(react-router): implement the typed useNavigate hook onto the Route and LazyRoute class ( #1385 )
...
* feat(react-router): return the useNavigate hook
* docs(react-router): update verbiage on the RouteClass doc
* test(react-router): ensure the typed hooks are available across the shared surfaces
2024-03-28 19:06:16 +01:00
Tanner Linsley
8b1e79c513
release: v1.23.1
v1.23.1
2024-03-28 03:30:45 +00:00
Sean Cassiere
74ca8a293e
chore: fix eslint errors being thrown on the basic example ( #1383 )
2024-03-28 16:28:38 +13:00
Sean Cassiere
7de90af88e
refactor: explicit re-exports for the packages ( #1374 )
...
* refactor(react-router): tanstack history
* refactor(react-router): not-found
* refactor(react-router): utils
* refactor(react-router): useRouterState
* refactor(react-router): useRouter
* refactor(react-router): useRouteContext
* refactor(react-router): routerContext
* refactor(react-router): useSearch
* refactor(react-router): useParams
* refactor(react-router): useNavigate
* refactor(react-router): useBlocker
* refactor(react-router): searchParams
* refactor(react-router): scroll-restoration
* refactor(react-router): RouterProvider
* refactor(react-router): router
* refactor(react-router): routeInfo
* refactor(react-router): route
* refactor(react-router): redirects
* refactor(react-router): qss
* refactor(react-router): path
* refactor(react-router): Mathes
* refactor(react-router): location
* refactor(react-router): link
* refactor(react-router): lazyRouteComponent
* refactor(react-router): fileRoute
* fix(react-router): all other functions from `utils` and the `getRenderedMatches` function from `Matches`
* refactor(react-router): CatchBoundary
* refactor(react-router): defer
* refactor(react-router): awaited
* refactor(react-router-server): Asset
* revert(react-router-server): Asset
* refactor(react-router-server): Asset
* refactor(react-router-server): createServerFn
* refactor(react-router-server): DehydrateRouter
* refactor(react-router-server): getManifestAssets
* refactor(react-router-server): json
* refactor(react-router-server): Meta
* refactor(react-router-server): RouterManagedTag
* refactor(Scripts):
* refactor(react-router-server): StartClient
* refactor(react-router-server): Scripts
* refactor(react-router-server): transformStreamWithRouter
* refactor(router-devtools): devtools
* refactor(react-router): HistoryState
* fix(react-router): missing ToPathOption type
* fix: missing type exports from `route`
* fix(react-router): missing types for `router`
2024-03-28 16:10:15 +13:00
Sean Cassiere
9d099dd755
docs: add reference pages for createLazyFileRoute and createLazyRoute ( #1379 )
...
* docs: add createLazyFileRoute
* docs: broken link to the FileRouteClass
* docs: remove the word literal
* docs: update the source of its configuration options
* docs: add createLazyRoute
2024-03-27 21:38:59 +13:00
Tanner Linsley
f6207ebb40
release: v1.23.0
v1.23.0
2024-03-27 04:56:26 +00:00
Sean Cassiere
c15f399e79
feat(router-generator): add option to format with semicolons in the generated route-tree ( #1376 )
...
* feat(router-generator): expose config to accept `semicolons` prop to prettier format with semicolons
* docs(router-generator): document the new `semicolons` configuration property
2024-03-27 05:54:07 +01:00
Valeriy Kobzar
9181cad9d7
docs: fix incorrect naming of parameters on the guide for not-found-errors ( #1377 )
...
Fixed a bug in the parameter name for the notFound function. Instead of 'route', it should use 'routeId'.
2024-03-27 17:16:05 +13:00
Tanner Linsley
5c7a180a34
release: v1.22.9
v1.22.9
2024-03-27 01:15:51 +00:00
Hans Yulian
4003b6bd39
fix(react-router): trailing slash shouldn't fail the path matching ( #1372 )
...
* fix: trailing slash shouldn't fail the path matching
* prettier fix
2024-03-27 14:13:09 +13:00
Tanner Linsley
fb3deb7f86
release: v1.22.8
v1.22.8
2024-03-26 13:21:46 +00:00
Dominik Dorfmeister
b6595b9865
fix: rename component created by createLink ( #1373 )
...
because if it's named `Link`, the world explodes
2024-03-26 14:18:12 +01:00
Dominik Dorfmeister
4972e945c5
ci: execute type checks against multiple TS versions ( #1367 )
...
* fix: peerDependencies
* docs: requirements
* ci: run type tests against multiple TS versions
* chore: newline
* chore: fix prettier
* fix: wrappers must return a JSX Element
* fix: have Explorer return JSX.Element
* fix: another one
2024-03-26 10:12:00 +01:00
Tanner Linsley
4e9c1acc67
release: v1.22.7
v1.22.7
2024-03-26 09:05:24 +00:00
Rudolf Halas
bfd9858146
fix: only show pending component for routes with a loader ( #1370 )
...
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-03-26 10:02:13 +01:00
Tanner Linsley
72f18683e2
release: v1.22.6
v1.22.6
2024-03-26 08:10:13 +00:00
Dominik Dorfmeister
41391cdd4a
refactor: eslint ( #1365 )
...
* feat: eslint
bring over the configs from the query repo
* refactor: auto fix history package
* refactor: manually fix history package
* refactor(react-cross-context): eslint
* refactor(react-router-server): eslint auto fix
* refactor(react-router-server): eslint manual fixes
* refactor(react-cli): auto fix eslint
* refactor(react-cli): manual fix eslint
* refactor(router-devtools): auto fix eslint
* refactor(router-devtools): manual fix eslint
* chore: prettier --write
* refactor(router-generator): auto fix eslint
* refactor(router-generator): manual fix eslint
* refactor(router-vite-plugin): auto fix eslint
* refactor(react-router): auto fix eslint
* refactor(react-router): manual fix eslint
* fix: revert some destructive changes
* refactor: fix remaining errors
* some more disables
* fix: eslint
2024-03-26 09:08:49 +01:00
Sean Cassiere
7d8b9e0b9c
docs: fixing the syntactically broken links within the documentation ( #1369 )
...
* docs: broken link linking to the SSR guide
* docs: broken link linking to the `RouterOptionsType#transformer-property`
* docs: fix broken link linking to code-splitting
* docs: fix broken link linking to the `RouterOptionsType`
* docs: fix broken link linking to external-data-loading
2024-03-26 10:44:17 +13:00
Sean Cassiere
cf5d136aa4
docs: include "layout" next to pathless routes and move "routing concepts" to its own page ( #1362 )
...
* docs: include layout as part of the pathless routes section
* docs: add links to the individual sections below
* docs: links for the route nesting stuff
* docs: move the routing concepts section to separate page
2024-03-26 09:45:55 +13:00
Leonardo Montini
59bb2604f2
docs: remove __404 mentions ( #1341 )
2024-03-25 16:34:49 +01:00
Tanner Linsley
1b35e57c6b
release: v1.22.5
v1.22.5
2024-03-25 14:44:19 +00:00
Dominik Dorfmeister
5d619890c0
fix: make restKey reactive ( #1363 )
...
accessing `router.state` is an imperative way of reading something from the router - it does not re-render the component; with this fix, we will always re-render the match if the `resetKey` changes, so that the `CatchBoundary` can reset accordingly.
This should fix cases where navigating away from a route did not reset errors correctly
2024-03-25 08:37:11 -06:00
Tanner Linsley
9f99fe9b9f
release: v1.22.4
v1.22.4
2024-03-25 14:34:37 +00:00
Dominik Dorfmeister
6a854b0ea7
fix: useNavigate subscriptions ( #1359 )
...
* fix: useNavigate subscriptions
there shouldn't be a need to subscribe useNavigate to useMatch to read the pathname, because we just need it inside the callback, we can read it imperatively
also, there was likely a stale closure problem if `location` changed, as `useMatch` would re-render the component, but `useCallback` wouldn't see the fresh value
* fix: depend on whole router class, because `.state` is an imperative getter
* fix: use resolvedLocation
* fix: useMatchRoute should not subscribe to router state
because we only access it imperatively in the callback, which will always read the latest values from router.state
2024-03-25 08:28:10 -06:00
Sean Cassiere
876b887589
docs: remove references to @tanstack/loaders ( #1357 )
...
* docs: remove tanstack loaders in the navigation doc
* docs: remove tanstack loaders in the external-data-loading doc
2024-03-23 17:28:41 +01:00
Tanner Linsley
c50fb3de34
release: v1.22.3
v1.22.3
2024-03-22 22:55:28 +00:00
Manuel Schiller
c5c325d817
fix: do not use CatchBoundary if neither route nor router default error component is configured ( #1355 )
2024-03-22 23:52:55 +01:00
Manuel Schiller
9687ebd90a
fix: loosen strict check in useMatch to allow accessing parent matches ( #1356 )
2024-03-22 23:52:27 +01:00
Sean Cassiere
58a15deb49
docs: add more missing reference pages ( #1352 )
...
* docs: add useNavigate to the RouteApiClass
* docs: add the useLoaderDeps hook
* docs: update RouteApi description
* docs: update getRouteApi description
* docs: add the useRouterState hook
* docs: add the useRouter hook
* docs: missing `hook` from title
* docs: add the useRouteContext hook
* docs: add the useSearch hook
2024-03-22 09:01:20 -06:00
Tanner Linsley
a1030ef24d
release: v1.22.2
v1.22.2
2024-03-22 06:35:29 +00:00
Tanner Linsley
c9ef457610
fix: safe header augmentation, add serialized error stacks in dev
2024-03-22 00:32:55 -06:00
Tanner Linsley
f90bdff8b0
release: v1.22.1
v1.22.1
2024-03-22 05:09:52 +00:00
Tanner Linsley
2862eaaf8d
fix: use jsesc for dehydrated data
2024-03-21 23:07:00 -06:00
Tanner Linsley
a542861cf4
release: v1.22.0
v1.22.0
2024-03-21 10:26:37 +00:00
Dominik Dorfmeister
8d9ad6dec9
feat: add useNavigate to RouteApi ( #1350 )
2024-03-21 11:25:28 +01:00
Tanner Linsley
bc4d3c71a0
release: v1.21.1
v1.21.1
2024-03-21 09:08:08 +00:00
Dominik Dorfmeister
a96713532c
fix: make sure useMatch errors with a better error message ( #1345 )
...
* fix(react): make sure useMatch errors with a proper message when using `strict`
before this fix, it was dying with a ReferenceError when accessing match!.route
* refactor(react): build `useParams` on top of `useMatch`
so that we get the same error reporting from useMatch
* fix: more generic error message
2024-03-21 10:07:02 +01:00
Tanner Linsley
a6b7cfef53
release: v1.21.0
v1.21.0
2024-03-20 21:40:48 +00:00
Christopher Horobin
e8aef4e868
tests: add basic type tests for Link ( #1346 )
2024-03-20 15:37:55 -06:00
Tanner Linsley
3bf1bef84e
feat: move createServerFn to react-router-server, add headers to redirects
2024-03-20 15:36:23 -06:00
Tanner Linsley
98f6dfc9a7
release: v1.20.6
v1.20.6
2024-03-20 21:31:11 +00:00