0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
Commit graph

18 commits

Author SHA1 Message Date
Tanner Linsley
ac29d55e94 fix: bring back shouldReload (but not its capability to track dependencies) 2023-12-19 00:08:12 -07:00
Tanner Linsley
3206f0481b fix: swr + remove shouldReload, activeOptions?.exact for search params 2023-12-18 17:28:12 -07:00
Tanner Linsley
8e7645ae24 feat: loaderDeps 2023-12-15 16:49:39 -07:00
Tanner Linsley
5ed8e42185 fix: preloading and potentially fix devtools context 2023-12-15 13:01:39 -07:00
Tanner Linsley
3da47db651 fix: component types 2023-12-13 23:48:30 -07:00
Tanner Linsley
5423710170 fix: navigation blocking 2023-12-08 23:27:28 -07:00
Tanner Linsley
2cd2eb2080 fix: fine-grained subscriptions 2023-12-06 16:07:59 -07:00
Tanner Linsley
aac5ad9db8 fix: remove fine-grained selectors
They didn't really work anyway... lol
2023-12-06 13:22:50 -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
722a3ce6b6 fix: refactor to full suspense + useTransition 2023-11-13 22:25:20 -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
12770b7150 fix: remove getContext, beforeLoad result decorates context 2023-09-01 16:42:39 -06:00
Tanner Linsley
9995e8975e fix: expose onEnter, onTransition, onLeave route options. 2023-09-01 12:13:23 -06:00
Tanner Linsley
89a1a47d62 fix: error handling options and scroll restoration 2023-08-24 13:22:33 -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