0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-18 19:34:24 +00:00
Commit graph

6,701 commits

Author SHA1 Message Date
Leonardo Montini
28aa8fb04e
feat(react-router): improve the blocker functionality for use with custom UI (#1649)
* feat: return async resolver from useBlocker hook

* feat: pass async resolvers to children on Block component

* fix: types and always reset promise

* docs: update example with custom UI

* refactor: namings

* docs: toggle between custom ui and default

* feat: expose status and refactor hook props

* feat: support current API

* feat: custom blocker should take precendence over the manual promise blocker

* test: unit test on condition to avoid breaking changes with the new API

* docs: deprecate old syntax and update the docs

* docs: create useBlocker API reference

* fix: deprecated interface
2024-05-25 13:49:08 +02:00
Sean Cassiere
92f4a09b9b
test(react-router): use React.act to contain warnings thrown by router.test.tsx (#1667) 2024-05-25 12:47:02 +12:00
Sean Cassiere
9fb0bde795
docs(examples): cleanup the "kitchen-sink*" examples (#1663)
Just some housekeeping for the kitchen sink examples that have become a bit messy over time.
2024-05-24 23:55:16 +12:00
Hiep Nguyen
dbb5641c9a
docs(examples): inline the PickAsRequired type in the "kitchen-sink-react-query" example (#1660) 2024-05-24 22:11:47 +12:00
Tanner Linsley
89467a5e22 release: v1.33.12 v1.33.12 2024-05-24 10:08:08 +00:00
Sean Cassiere
4c67e76a3e
fix(router-generator): conflicting prettier outputs (#1661)
* style: prettier

* test(react-router): try using `it`

* chore: undo those test trys

* fix(router-generator): remove unnecessary line breaks

* fix(router-generator): closer to what it was earlier

* fix(router-generator): dont conflict with tsr project prettier for snapshots
2024-05-24 22:06:05 +12:00
Tanner Linsley
55adc136b9 examples: test vercel link 2024-05-23 17:22:52 -06:00
Tanner Linsley
cab6c3958f release: v1.33.11 v1.33.11 2024-05-23 23:16:24 +00:00
Tanner Linsley
6219cb80a9 fix: include all files in preloads 2024-05-23 17:14:15 -06:00
Tanner Linsley
1d901caea9 release: v1.33.10 v1.33.10 2024-05-23 22:40:56 +00:00
Tanner Linsley
e0a7545ad1 fix: modulepreload 2024-05-23 16:39:01 -06:00
Tanner Linsley
59afb56cb5 release: v1.33.9 v1.33.9 2024-05-23 22:23:17 +00:00
Tanner Linsley
f0056b556b fix: dedupe and key meta 2024-05-23 16:20:47 -06:00
Tanner Linsley
b97533d108 release: v1.33.8 v1.33.8 2024-05-23 21:48:56 +00:00
Tanner Linsley
f1147714ff fix(start): bundling and tests 2024-05-23 15:46:19 -06:00
Tanner Linsley
97edd010d1 Merge branch 'main' of https://github.com/TanStack/router
# Conflicts:
#	examples/react/start-basic/package.json
#	examples/react/vinxi-basic-ssr-streaming/package.json
#	examples/react/vinxi-basic-ssr/package.json
#	examples/react/vinxi-basic/package.json
#	pnpm-lock.yaml
2024-05-23 12:01:37 -06:00
Tanner Linsley
6d29cd7f64 fix(start): add experimental support for route manifest and ssr route manifest usage 2024-05-23 11:59:40 -06:00
Tanner Linsley
911b958ca5 release: v1.33.7 v1.33.7 2024-05-21 20:43:41 +00:00
Christopher Horobin
b6fdbf342b
fix: should render error component when beforeLoad throws an error (#1648)
fixes #1647
2024-05-21 22:41:47 +02:00
Elia Maino
1ea92a3d79
docs: Update useBlocker function signature (#1639)
* docs: Update `useBlocker` function signature

* docs: update `message` to `blockerFn`
2024-05-21 21:28:00 +02:00
Christopher Horobin
022e725b9c
tests: add runtime tests for Link (#1590) 2024-05-21 16:30:17 +02:00
Sean Cassiere
d20a422160
docs: touchups to the reference pages for RouterState type, useRouterState, and useMatches (#1645)
* docs: better RouterState doc

* docs: useRouterState updates

* docs: useMatches

* docs: forgot to do that

* docs: and that
2024-05-21 20:40:38 +12:00
Sean Cassiere
59e3f52286
docs: update the content on the reference page for RouterEvents type (#1644)
* docs: update the content on the `RouterEvents type` reference page

* docs: verbiage

* docs: make it simpler
2024-05-21 17:57:04 +12:00
Sean Cassiere
463d360f12
test(router-vite-plugin): use windows-friendly filenames for the snapshots (#1643)
* chore(router-vite-plugin): rename the snapshots

* test(router-vite-plugin): use `(...)` as the split prefix as part of the filename for search on the fs

* chore: switch to using `@`
2024-05-21 16:41:55 +12:00
Tanner Linsley
f9c98c6be6 release: v1.33.6 v1.33.6 2024-05-21 03:29:52 +00:00
Sean Cassiere
e19f7e8703
fix(react-router): only update the route-context during beforeLoad (#1642)
* fix(react-router): only update the route-context during beforeLoad

* chore: add the comment back in

* style: prettier
2024-05-21 15:28:02 +12:00
Tanner Linsley
05941e5ef2 release: v1.33.5 v1.33.5 2024-05-19 03:23:26 +00:00
Tanner Linsley
cb80816603 fix(start): config for RSCs... almost 2024-05-18 21:06:34 -06:00
Sean Cassiere
ab02f3ebd3
docs: moving reference content out of the class files (#1633)
* RouterType

* RouteApiType

* RouteType

* ParsedLocation linking

* linking RouterType, RouteType, and RouteApiType

* reduce SearchParamOptionsType and PathParamOptionsType into ToOptionsType

* useLinkProps

* forgot to remove that

* more
2024-05-19 14:52:44 +12:00
Tanner Linsley
1ce9e99fb9 release: v1.33.4 v1.33.4 2024-05-18 23:19:28 +00:00
Sean Cassiere
26a8fd7923
fix(react-router): remove an unneeded console.log('trigger') line (#1632) 2024-05-19 11:17:33 +12:00
Tanner Linsley
55b5205eed release: v1.33.3 v1.33.3 2024-05-18 21:45:21 +00:00
Dominik Dorfmeister
099aa926ef
refactor: JsDoc for RouterOptions (#1631) 2024-05-18 23:43:29 +02:00
Tanner Linsley
34ed411cca examples: update dependencies 2024-05-18 12:19:42 -06:00
Tanner Linsley
17a9430689 examples: don't pnpm-lock the start-basic example 2024-05-18 12:14:49 -06:00
Tanner Linsley
faef7261e2
fix: fix main type errors 2024-05-18 11:57:11 -06:00
Tanner Linsley
51bc6ffb13 release: v1.33.2 v1.33.2 2024-05-18 17:46:02 +00:00
Dominik Dorfmeister
3b5cdefd82
refactor: don't disable rules-of-hooks linter (#1625) 2024-05-18 19:44:08 +02:00
Sean Cassiere
62bf384972
docs: clearing up the internal types from the references (#1627)
* remove AnyParamsType

* remove AnyRedirectType

* AnyRouteMatchType

* AwaitOptionsType

* FileRoutesByPath

* FullSearchSchemaType

* ParseRouteType

* ParseRouteChildrenType

* RegisteredRouterType

* RouteByIdType

* RouteIdsType

* RouteByPath

* RoutePathsType

* RouterErrorSerializerType

* link RouterEventsType

* RouterTransformerType

* RoutesByIdType

* RoutesByPathType

* SearchSchemaInputType

* link to ToOptionsType

* DeferredPromiseStateType
2024-05-19 01:37:49 +12:00
Tanner Linsley
835e39645d release: v1.33.1 v1.33.1 2024-05-18 12:56:27 +00:00
Gianmarco Rengucci
0c930b2e47
fix(react-router): allow root route to be wrapped in suspense (#1611) 2024-05-18 14:53:45 +02:00
wweber
1391335f8d
fix: export TrailingSlashOption. (#1616) 2024-05-18 14:53:33 +02:00
Tanner Linsley
4de0c5751e release: v1.33.0 v1.33.0 2024-05-18 12:51:18 +00:00
Dominik Dorfmeister
6c1d831b27
feat: onCatch callback on routes and defaultOnCatch for router (#1623)
* feat: onCatch callback on routes and defaultOnCatch for router

to catch errors thrown by ErrorBoundaries

* docs: onCatch

* docs: add default
2024-05-18 14:49:25 +02:00
Tanner Linsley
11af35ee04 release: v1.32.17 v1.32.17 2024-05-18 12:24:42 +00:00
Dominik Dorfmeister
4d0160a27e
refactor: fix type errors (#1626)
* refactor: fix type errors in eliminateUnreferencedIdentifiers.ts

* fix: relative import

* fix: no-cycle by moving rootRouteId into its own file.

The cycle was:
useMatch imports Matches
Matches import route (only for rootRouteId)
route imports useMatch

by moving rootRouteId to its own file, we break the cycle because Matches does not need to depend on route anymore

* refactor: import RootRouteId from the right place

* style: prettier

---------

Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-05-18 14:23:07 +02:00
Tanner Linsley
e712d3d57a fix: import 2024-05-18 01:28:56 -06:00
Tanner Linsley
782caa4977
fix: merge vinxi branch
* vinxi

* fix: createServerFn extraction, start config, vinxi config, dead-code elimination
2024-05-18 01:24:47 -06:00
Tanner Linsley
159c2e50b3 release: v1.32.16 v1.32.16 2024-05-18 04:50:54 +00:00
Sean Cassiere
5168c8ffc1
fix(react-router): route context being undefined in StrictMode on initial render (#1620) 2024-05-18 16:49:29 +12:00