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

78 commits

Author SHA1 Message Date
Sean Cassiere
020edb5be7
examples: correct usage of the createLazyRoute function (#1230) 2024-02-27 19:31:41 +01:00
Tanner Linsley
1fb4082c07 feat: createLazyRoute 2024-01-24 20:41:50 -07:00
Tanner Linsley
fcc278ffc8 feat: New code-splitting patterns + deprecations
- Deprecated class constructor APIs in favor of new `create[Class]` functions
- Added new code-splitting paradigm that produces less code, preloads potentially faster and plays nicely with SSR and file-based routing
- Updated all examples to use new code splitting patterns and new suggested APIs
2024-01-24 13:01:48 -07:00
Tanner Linsley
912fae7e67 examples: some styles 2023-12-23 15:33:16 -07:00
Tanner Linsley
f108b5986f examples 2023-12-18 17:30:48 -07:00
Tanner Linsley
3206f0481b fix: swr + remove shouldReload, activeOptions?.exact for search params 2023-12-18 17:28:12 -07:00
Tanner Linsley
5ed8e42185 fix: preloading and potentially fix devtools context 2023-12-15 13:01:39 -07:00
Tanner Linsley
84eec0e4ca examples: update 2023-12-11 15:39:59 -07:00
Tanner Linsley
5423710170 fix: navigation blocking 2023-12-08 23:27:28 -07:00
Tanner Linsley
36d774bc36 fix: do not recreate history on fast refresh 2023-12-04 09:24:15 -07:00
Tanner Linsley
703fbcf4d4 examples: fix react-query 2023-12-01 09:35:59 -07:00
Tanner Linsley
76f411cfad fix: default to always reloading 2023-11-30 16:48:54 -07:00
Tanner Linsley
883f608906 fix: errorComponent opt-out / bubbling 2023-11-30 15:00:43 -07:00
Tanner Linsley
cae467a7ab feat: shouldRevalidate dependencies 2023-11-30 14:23:19 -07:00
Tanner Linsley
e0ebb9d02d feat: shouldReload 2023-11-30 13:53:27 -07:00
Tanner Linsley
8fab8b4175 feat: loader + ephemeral loaderData
Breaking Changes:

- `load` has been renamed back (I know...) to `loader`. Don't kill me. This again stays true to the nature of its functionality.
- `loader` can once again return data, but it is stored ephemerally on the route match and re-loaded on every navigation.
- If you choose to store data in `loaderData` from the `loader` function, you'll likely want to employ some level of caching to ensure you're only fetching data when necessary and resolving as early as possible if you have any meaningful cached data to display to the user. TanStack Query is a great tool to do this.
2023-11-29 01:16:52 -07:00
Tanner Linsley
66ec994600 fix: Rename route and router meta back to route and router context
- Route meta and router meta have been renamed back to context. Bikeshed!
- The RouterContext class has been removed in favor of a new `rootRouteWithContext` factory function e.g. rootRouteWithContext<YourRouterContext>()(config)
2023-11-07 13:45:15 -07:00
Tanner Linsley
4a792144eb feat: Big refactor to React only
There are many breaking changes in this release:
- The Router class no longer has many of the methods it had.
- Most of these methods have been moved to the new routerContext, which is served via the useRouter() hook
- React state is being used for all state management, which should set the stage for better transition/suspense support
- Router Context and route context has been renamed to Router Meta and Route Meta
- Loaders are gone. You can still force a route to wait for an async function via `beforeLoad`, which is serial or `load` which is parallel.
- There's a lot of other changes, but I'm too tired to think straight.
2023-11-05 01:38:08 -06:00
Tanner Linsley
5fdf465ecf feat: loaderContext
Breaking Changes:
- `search` and `hash` are no longer directly available in route loaders
- The route `key` option has been removed

New:
- Added a new optional route option `loaderContext`. It's a function that receives `search` and `hash` and expects you to return any serializable data from them that you require in your loader. This stable-serialized value is used to uniquely identify route matches coming from this route configuration and acts as a dependency tracker for when loaders should rerun, etc.
2023-09-28 13:22:22 -06:00
Tanner Linsley
ae621c93ea feat: route masking 2023-09-11 10:07:10 -06:00
Tanner Linsley
715d56f132 Update main.tsx 2023-09-04 15:35:02 -06:00
Tanner Linsley
a78555a0bd fix: do not allow arrays through qss
Fixes #711
2023-09-04 15:31:30 -06:00
Tanner Linsley
2f92981970 fix: preloading bug 2023-09-01 14:25:09 -06:00
Tanner Linsley
9995e8975e fix: expose onEnter, onTransition, onLeave route options. 2023-09-01 12:13:23 -06:00
Tanner Linsley
4767648c15 fix: framework agnostic packages 2023-08-08 18:34:31 -06:00
Tanner Linsley
79eb2ff027 feat: bring back route loaders, caching, etc 2023-08-07 15:22:49 -06:00
Tanner Linsley
3ab35065d1 fix: loader state isLoading and isFetching 2023-07-27 22:08:52 -06:00
Tanner Linsley
9bfd4f8ca1 fix: big refactor 2023-07-27 20:44:08 -06:00
Tanner Linsley
2e820eecf3 fix: (de)hydration changes 2023-07-21 23:14:09 -06:00
Tanner Linsley
572caa56a0 fix: add route.to for navigation
Fixes #630
2023-07-10 12:20:39 -06:00
Tanner Linsley
9a4bb4306d fix: wildcard matchIDs
Fixes #626
2023-07-08 10:41:06 -06:00
Tanner Linsley
1c2d94e97f fix: more accurate from/to types, component useParams prop
Fixes: #536 #627
2023-07-08 10:13:25 -06:00
Tanner Linsley
12b263ab64 checkpoint 2023-04-18 13:38:20 -06:00
Tanner Linsley
3581aec569 checkpoint 2023-02-20 09:41:43 -07:00
Tanner Linsley
b87a7a0fc1 Checkpoint 2023-02-17 10:52:09 -07:00
Tanner Linsley
ef6b60e010 Checkpoint 2023-02-14 22:30:53 -07:00
Tanner Linsley
b39dc9c01f docs: recommend fullPath instead of .id for navigation 2023-02-08 15:52:44 -07:00
Tanner Linsley
beb1e7b074 fix: hash history link generation
Fixes #457
2023-02-05 22:19:32 -07:00
Tanner Linsley
7d74ec8c3e fix: move window focus refetching into tanstack/loaders 2023-02-04 21:02:07 -07:00
Tanner Linsley
b343e31f95 Auto rank routes 2023-02-04 11:37:07 -07:00
Tanner Linsley
0a396f1bfe fix: add redirects, better errorComponents, no trailing slash bug 2023-02-02 16:53:33 -07:00
Tanner Linsley
bf4bc5a752 Update main.tsx 2023-01-30 15:32:53 -07:00
Tanner Linsley
a3155e06bb checkpoint 2023-01-27 11:34:35 -07:00
Tanner Linsley
55dca38354 fix: better preloading logic 2023-01-25 23:09:33 -07:00
Tanner Linsley
cd17e38a80 examples all non-ssr examples working 2023-01-25 10:35:11 -07:00
Tanner Linsley
434aa7405a fix: lazy loaderClient/actionClient initilialization 2023-01-24 15:59:57 -07:00
Tanner Linsley
b47c34877a fix: matching logic 2023-01-24 14:56:26 -07:00
Tanner Linsley
894c47fe92 checkpoint 2023-01-24 12:22:10 -07:00
Tanner Linsley
8033e6aea9 checkpoint 2023-01-23 21:59:40 -07:00
Tanner Linsley
039441f33f fix: loader api changes 2023-01-23 15:51:30 -07:00