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

480 commits

Author SHA1 Message Date
Manuel Schiller
64ae7c3998
docs: improve routeFileIgnorePattern description 2024-05-06 17:49:41 +02:00
Sean Cassiere
5035865f87
docs: add a callout in the file-based routing options about not conflicting with the naming conventions (#1519)
* docs: callouts in the file-based routing conventions

* docs: make the callouts related their properties/options

* docs: emojis!

* docs: add a callout in the "file-naming conventions" section

* docs: use a single callout in the "options" sections

* docs: better callout in the 'file-naming conventioned' section

* docs: missing words

* docs: that should be it

* docs: be a bit more obvious about the `-`
2024-04-25 22:04:27 +12:00
Sean Cassiere
00fb7a5a71
docs(examples): update the authenticated-routes example to use layout routes (#1505)
* docs: rename the authenticated-routes example

* docs: update the authenticated-routes example to use layouts

* docs: trim up the authenticated routes example

* docs: default navigation to `/dashboard`

* docs: add auth persistence
2024-04-22 14:35:22 +12:00
Sean Cassiere
94ffb85bc4
feat(router-generator): prepend and append header and footer content to the generated route-tree file as defined by the user (#1502)
* feat(router-generator): append and prepend lines to the generated route-tree

* test(router-generator): making sure it works!

* refactor(router-generator): rename the prepend and append properties

* docs: docs on the new prepend and append functionality

* refactor(router-generator): update configuration property names

* test(router-generator): update the tests with the new configuration property names

* docs: update file-based routing guide with the new property names

* refactor(router-generator): move to the defaults

* test(router-generator): updated test output

* docs: show what the defaults are on the docs
2024-04-21 14:02:14 +12:00
Sean Cassiere
052e940d47
docs: adding file-routes to the react-location migration guide (#1501) 2024-04-21 00:00:19 +12:00
Sean Cassiere
5d3c1f8b2c
docs: add an outlet on the posts.tsx page (#1498) 2024-04-20 17:53:51 +12:00
Sean Cassiere
bc616f1e62
docs: add migration guide for react-location (#1497)
* docs: add migration guide for react-location

* chore: show the react-location migration guide

* docs: remove the word "over"

* docs: make ssr a guide to feature
2024-04-20 17:10:23 +12:00
Manuel Schiller
e08b881358
feat: strong typing for onEnter, onStay and onLeave (#1479) 2024-04-19 22:28:28 +02:00
Tanner Linsley
7b173f5088 fix: always use React transitions around navigations, experimental view transitions API 2024-04-18 16:33:04 -06:00
Hugo Costa
23fbecb62a
fix: broken example link (#1485) 2024-04-18 13:56:16 -06:00
Tanner Linsley
d09db60415 fix: Refactored many things!
- Fixed an issue where preloads would redirect and not resolve to the correct location
- Removed the need for `getRenderedMatches`. The matches intended to be rendered are now always stored at `store.matches`
- Removed the experimental ability for async meta and headers. Loaders should be used to get async data into these functions
- Pending matches now take `beforeLoad` into account and properly start pendingMs timers.
- `pendingMinMs` is also more accurate now by only triggering its timers when the pending state is encountered during rendering
- Removed a logical path where the `pending` component could be directly rendered within a route instead of handled by suspense
- Matches that don't require loaders or beforeLoaders will start as "success".
- Meta and headers are now called and saved for matches that are cached or already in the "success" state
- Fixed an issue where redirects and not-found errors would get improperly swallowed
- Fixed an edge-case where outdated navigations were not ignored and created race-conditions
- Refactored isServer into the router so we can do some better mocking in tests
- Added tests around scripts, meta, and redirects
- Fixed issues with non-vinxi server envs
- Injected html now waits for <body>

Closes #1104 #1146 #1168
2024-04-15 16:11:22 -06:00
Albert Chang
3aa01dc32e
docs: fix incorrect naming of index.route.tsx to route.tsx on the code-splitting guide (#1465) 2024-04-13 22:45:18 +12:00
Manuel Schiller
3d3f91859e
feat: allow to configure trailing slash behavior (#1464) 2024-04-12 23:07:39 +02:00
Sean Cassiere
136477c3dd
deprecate: navigate function as an argument in the beforeLoad and loader callbacks (#1459)
* feat(react-router): mark the `navigate` function in the `beforeLoad` and `loader` callbacks as deprecated

* docs: mark the navigate function passed into the `beforeLoad` and `loader` functions as deprecated
2024-04-12 18:03:15 +02:00
Raphael Cunha
de62f894f1
Update routing-concepts.md (#1452)
Add outlet import from @tankstack/react-router
2024-04-09 15:38:37 -06:00
Sean Cassiere
7731bf1294
docs: fix broken links on top-level guides (#1448)
Investigation into the broken links found by @MarcoB-Ec lead me to discovered these were broken in the top-level docs as well.

Co-authored-by: Marco Brito <35307131+marcob-ec@users.noreply.github.com>
2024-04-09 10:50:46 +12:00
Dave Keen
43d08080c1
docs: fix a typo in the static-route-data guide (#1426) 2024-04-05 23:05:23 +13:00
Tanner Linsley
4ef78725af
docs: prep for migration of tanstack.com to TSR (#1419) 2024-04-02 16:46:22 -06:00
Kevin Herklotz
40af8ec334
docs: broken link to "using search params in loaders" in data-loading.md from search-params.md (#1416) 2024-04-03 06:12:40 +13:00
ajschlosser
d2c12172e6
Update quick-start.md to include installation of devtools cited throughout rest of document (#1403) 2024-03-31 19:35:17 -06:00
Leonardo Montini
e84815cdc0
docs: improve links to not found pages (#1396) 2024-03-31 00:56:55 +13:00
Dominik Dorfmeister
9f9b847ea7
feat: add reset prop to errorComponent (#1358)
* feat: add reset prop to errorComponent

* fix: types of defaultErrorComponent

* fix: put match into pending state when being invalidated if it was in error state

* docs: reset

* docs: error handling

* docs: integrate error handling into example

* chore: prettier on md files

* chore: fix wrong auto import

* fix: reset error boundaries from react-query in an effect

so that navigating away from a route will also re-trigger the query

* docs: error handling with TanStack Query

* chore: fix eslint

* fix: not all error components have a `preload`

* fix: merge conflict
2024-03-29 23:21:04 +01: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
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
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
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
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
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
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
GoldFrosch
03f82c6bb2
feat: add routeFileIgnorePattern option to generator (#1310) 2024-03-15 12:17:07 +01:00
Rui Saraiva
89bacc3341
docs: fix TanStack & TypeScript typos (#1291)
* docs: fix TanStack & TypeScript typos

* docs: fix TanStack & TypeScript typos

---------

Co-authored-by: Rui Saraiva <ruisaraiva@mbp-14.lan>
2024-03-12 22:41:15 +01:00
Efstratios Bektasiadis
74f570832e
docs: fixed broken authenticated routes example url (#1298) 2024-03-12 21:17:58 +01:00
Doug Richar
7b2b155d43
docs: fix router.invalidate() example in Data Mutations guide (#1299) 2024-03-12 21:16:40 +01:00
Lachlan Collins
7995d0a123
docs: Update docs/config.json (#1294)
* docs: Update docs/config.json

* Update schema
2024-03-12 20:42:45 +11:00
Sekamatte Soul Solomon
2094ca89c8
docs: Update decisions-on-dx.md (#1288)
Fix: Grammatical errors in docs
2024-03-11 17:38:54 +01:00
Nils Hartmann
734970aacc
docs: fix useMatchHook (#1282)
- options argument is not optional
- clarify opts.from/opts.strict dependency
2024-03-09 16:21:58 +01:00
Manuel Schiller
409b06dbb7 chore: fix doc formatting 2024-03-09 11:57:34 +01:00
Sean Cassiere
e4bc7d7e0a
docs: normalizing the hierarchy content in the reference pages (#1232)
* createFileRoute

* createRootRoute

* createRouteFunction

* createRouteFunction and RouteClass

* defer, awaitComponent, useAwaitedHook

* getRouteApiFunction and RouteApiClass

* isNotFoundFunction

* isRedirectFunction

* lazyRouteComponentFunction

* createRootRouteWithContext

* createRootRouteFunction

* new notFound conventions

* NotFoundRouteClass

* redirectFunction

* RedirectType

* catchBoundaryComponent

* catchNotFoundComponent

* DefaultGlobalNotFound

* useLinkPropsHook

* ActiveLinkOptions

* errorComponentComponent

* linkComponent

* LinkOptionsType

* LinkPropsType

* navigateComponent

* NavigateOptionsType

* outletComponent

* ToOptionsType

* FileRouteClass

* add the word type

* rootRouteWithContextFunction

* matchRouteComponent

* MatchRouteOptionsType

* useChildMatchesHook

* useLinkPropsHook

* UseLinkPropsOptionsType

* useLoaderDataHook

* useMatchesHook

* useMatchHook

* useMatchRouteHook

* UseMatchRouteOptionsType

* useNavigateHook

* useParamsHook

* useParentMatchesHook

* AllParamsType, RegisteredRouterType, RegisterType

* alphabetical sorting

* add link to the RouteMatchType

* useLoaderDataHook

* AnyRouteMatchType

* bulk for types

* consistency in page linking

* remove backticks from heading items that do not wrap inline-code-blocks
2024-03-08 11:37:02 +01:00
Seedy
4e78898280
docs: Update scroll-restoration.md (#1270) 2024-03-07 21:13:07 +01:00
Alejandra
2600d771f2
docs: Update authenticated-routes.md (#1267) 2024-03-06 21:27:13 +01:00
Alejandra
4422ed294c
focs: fix typos in route-trees.md (#1266)
* fix: minor typo in `route-trees.md`

* Update route-trees.md

* Update route-trees.md

* Update route-trees.md
2024-03-05 21:36:30 +01:00
Norbert Elter
1a95d98250
feat: optionally allow to disable logging in generator (#1256)
* feat: disableLogging

* feat: logging util
2024-03-04 21:34:03 +01:00
Tanner Linsley
3b559fc931
fix: ssr improvements (#1248)
* fix: ssr improvements

* fix: remove log

* fix: remove log

* fix: remove comments

* docs: root abstraction

* fix: remove commented code

* fix: remove old TLoaderData fix attempt

* fix: remove commented code

* fix: imports

* docs: format

* fix: deprecate and handle not found "global" option
2024-03-04 11:23:41 -07:00
Yiheng
1a37474f84
docs: Update file-based-routing.md (#1257)
* Update file-based-routing.md

* Update file-based-routing.md
2024-03-04 11:20:59 +01:00
Abdullah_Aleiti
aa3da31925
docs: Fix route-trees.md to use appropriate article. (#1254) 2024-03-03 19:54:13 +01:00
Pawel Fajfer
73fc10b195
docs: make loader function async in deferred-data-loading guide (#1258) 2024-03-03 19:50:11 +01:00