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

526 commits

Author SHA1 Message Date
Sean Cassiere
9880bb8bb1
docs: use gfm alerts in the documentation (#1924)
* docs: gfm alerts on the deprecated apis

* docs: gfm alerts in the api reference

* docs: gfm alerts in framework/react

* docs: gfm alerts in framework/react/guide

* docs: more gfm alerts in the api reference

* docs: update to the decisions on dx doc
2024-07-10 11:46:21 +12:00
Igor Adrov
08d3e61b4c
docs: Fix typo in migrate-from-react-router.md (#1914) 2024-07-07 20:20:05 +02:00
Sean Cassiere
37b74fa143
docs: add links to the github examples on the file-based routing guide for each supported bundler (#1903)
* docs: grammatical errors

* docs: add links to the quickstart examples
2024-07-06 11:29:05 +12:00
Corbin Crutchley
780b778137
docs: add quickstart guide for TanStack Start (#1857)
* docs: add quickstart guide for TanStack Start

* docs: add initial documentation for createServerFn (#1858)

* docs: add initial documentation for createServerFn

* chore: fix broken code sample

* docs(start): more explanation on the mental model of server functions (#1859)

* grammatical error in what are server functions?

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>

* docs: address feedback for Start Guide

* chore: fix PNPM file

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-07-05 19:32:29 +02:00
Honza Hrubý
bcc316eb1a
fix(router-plugin): add webpack support and resolve rspack code-splitting blockers (#1864)
* basic webpack example

* setup webpack plugin

* use webpack plugin

* add missing webpack config

* disable code split

* fix docs

* add watcher

* code split config

* documentation

* lazy load chokidar

* chore(router-plugin): set the webpack peerDeps

* feat(router-plugin): get code-splitting working for webpack

* refactor(router-plugin): better detection of the build mode

* chore(router-plugin): remove this console.log

* fix(router-plugin): remove the blockers for codesplitting with rspack

* chore(router-plugin): remove the unstable flags for webpack and rspack

* docs(router-plugin): remove the unsupported warnings for `experimental.enableCodeSplitting` for webpack and rspack

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-07-03 19:42:45 +12:00
Sean Cassiere
9040999892
style: prettier on the docs (#1872) 2024-07-02 12:16:28 +12:00
friendlywavingrobot
994453b436
docs: remove the unnecessary encode and decode URIComponent calls in the zipson example of the "custom search param serialization" guide (#1870) 2024-07-02 12:07:27 +12:00
Tanner Linsley
23614fa79a fix: add react-router-with-query experimental package 2024-07-01 00:15:41 -06:00
Sean Cassiere
2d28367b84
docs: add a diagram on the "custom search param serialization" guide on the need for idempotency (#1860)
* docs: add the image

* docs: update the page with the diagram
2024-06-29 23:30:30 +12:00
Christopher Horobin
1d733f6cc6
feat(react-router): params.parse and params.stringify instead of parseParams and stringifyParams (#1826) 2024-06-28 18:34:49 +02:00
Tanner Linsley
fd692cf77d
feat: New Serialization Paradigm (#1824)
* checkpoint

* fix: config

* checkpoint

* testing fixes (#1679)

* examples: init trellaux

* feat: Better serialization/streaming, RSC proof of concept

* fixup server-handler

* fix: update deps and lock

* fix: remove rscFrom

* fix: remove useLoaderDataTransform

* fix: min react version

* chore: lockfile

* style: prettier fail

* chore: swap expect-error for ignore

* chore(react-router): try coercing the types

* chore: put this back in

* fix: some tests

* remove conditions

* fix tests

* update lockfile

* fix: refactor dehydrated data

* Update docs

* fix: remove unused deferred logic

* fix port

* nevermind

* fix: remove rebase garbage

* disable playwright for a hot minute

* oops, actually disable it now

* fix: prettier formatting

* fix: do not ignore app.config files

---------

Co-authored-by: Nikhil Saraf <nsaraf98@gmail.com>
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-06-28 09:45:01 -06:00
Christopher Horobin
f970023cd6
docs: add TS performance guidance with prefetching (#1781)
* docs: add TS performance guidance with prefetching

* chore: make suggestions
2024-06-22 10:38:42 +12:00
Manuel Schiller
b1213eb57d
feat: allow to ignore blocker in navigate and <Link> (#1797) 2024-06-21 19:49:33 +02:00
Sean Cassiere
a9874aad26
fix(router-plugin): add the rspack/rsbuild handler for file-based routing (#1794)
* feat: setup the starter for an rspack integration

* refactor(router-plugin): compose the plugins toghether

* feat(router-plugin): initial export for rspack

* docs(examples): add the quickstart-file-based pages in

* feat(router-plugin): generator should generate the route-tree on startup

* feat(examples): use the route-tree

* feat(router-plugin): router-generator working

* feat(router-plugin): rspack support only for the generator

* refactor(router-plugin): make the rspack exports a bit cleaner

* chore(router-plugin): jsdocs for the vite plugin

* docs(router-plugin): update with references and mentions to rspack/rsbuild

* style(router-plugin): eslint import ordering 😭
2024-06-21 11:51:08 +12:00
Sean Cassiere
ee48ae2aa1
docs: update the documentation on the @tanstack/router-plugin package (#1793)
* docs: update the file-based routing guide

* docs: update the quick-start guide

* docs: update the migrate from react-location guide

* docs: more updates to the migration from react-location guide

* docs: update the code-splitting guide

* docs: update the routing concepts guide

* docs: broken link on the code-splitting guide
2024-06-20 11:24:28 +12:00
Sean Cassiere
13a0cc0631
docs: update the custom search param serialization guide (#1759)
* docs: update the custom search param serialization guide

* docs: move the image a bit further down

* docs: remove the image
2024-06-19 21:32:57 +12:00
Sean Cassiere
92c6c2b1ff
docs: add documentation on the experimental.enableCodeSplitting feature (#1761)
* docs: add the content to the guide

* docs: add a link to the guide
2024-06-17 21:39:55 +12:00
SeanCassiere
e908be4076
docs: moving the actual file-based routing specific stuff not related to code-splitting to the right file 2024-06-17 20:58:28 +12:00
Eliav2
a64513860b
docs: typo in the navigation blocking guide (#1754) 2024-06-15 10:43:31 +12:00
Daniel Guldberg Aaes
30ae443f14
docs: fix some mistakes in the example of the SSR guide (#1748)
The current docs has a conflicts with a local declaration of 'createRouter'. and the import for the routeTree.gen is missing a ./
2024-06-14 22:07:29 +12:00
Manuel Schiller
be3a410e46
docs: replace Meta with Static Data 2024-06-11 22:04:10 +02:00
reihwald
a1fb6417b8
feat(router-devtools): add shadowDOMTarget option to TanStackRouterDevtools and TanStackRouterDevtoolsPanel (#1709) (#1720)
* feat: add shadowDOMTarget option to TanStackRouterDevtools and TanStackRouterDevtoolsPanel (#1709)

* feat: add documentation for shadowDOMTarget (#1709)

---------

Co-authored-by: Liam Reihwald <liam.reihwald@worldline.com>
2024-06-11 17:52:08 +12:00
Golamrabbi Azad
6979e62d03
docs: spelling mistake in the filename of the _authenticated layout route in the authenticated routes guide (#1723) 2024-06-08 19:30:09 +12:00
Dima Hinev
871ba64a91
docs: spelling mistakes on the route-masking guide (#1717)
removed the the from page
2024-06-08 12:54:35 +12:00
Leonardo Montini
85f5e7be1b
docs: mention how to disable the plugin in tests (#1682)
* docs: mention how to disable the plugin in tests

* docs: improve phrasing
2024-05-30 20:07:30 +02:00
Tanner Linsley
0be110012c fix: no more weird streaming APIs, just use suspense + streaming 2024-05-26 22:56:02 -06:00
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
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
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
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
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
Dominik Dorfmeister
099aa926ef
refactor: JsDoc for RouterOptions (#1631) 2024-05-18 23:43:29 +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
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
Sean Cassiere
9f0d4c76b5
docs: documented the the usage of hooks and context in the "Router Context" guide (#1609) 2024-05-17 21:35:19 +12:00
Manuel Schiller
45252f3d66 docs: fix links 2024-05-17 00:05:55 +02:00
Manuel Schiller
c38c02cc07 chore: fix doc formatting 2024-05-16 23:56:47 +02:00
simon-lund
f2ddae666f
docs: fix syntax error in example with loader and useSuspenseQuery (#1602)
This will fix the example with useSuspenseQuery for the Router loader. You cannot just write `const posts = useSuspenseQuery(...)` but have to resolve the data property as so `const  {data: {posts}} = useSuspenseQuery(...)`
2024-05-16 15:27:36 +02:00
Christopher Horobin
0898f2e12e
perf: new addChildren signature and generate more (#1564)
Be sure to re-run generator after upgrading

* perf: get lazy? do less?, generate more

* feat: add support for objects for children at runtime

- add type tests for objects with children
- add runtime support for objects with children
- add runtime tests for objects with children

* perf: apply similar optimisations for merging for code based

* perf: improve performance of LinkProps when passed to `Link`

* exmaples: add to large based file examples search, params and context

* docs: add TS performance recommendations to docs

* fix: remove route groups from id

* examples: update linkprops examples

* docs: update docs based on comments

* chore: remove export of `LinkComponentProps`

* chore: clean up PR

---------

Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2024-05-13 16:54:41 +02:00
Saiful Islam
a85970e2d7
docs: Update root file name and update root ID (#1585) 2024-05-12 22:45:45 +02:00
Sal Hasan
2a19b03d6b
feat(react-router): add a useLocation hook to get the current ParsedLocation (#1577) 2024-05-11 14:33:15 +02:00
Sean Cassiere
97d96befe3
docs: broken hyperlink on the "route-matching" guide (#1582) 2024-05-10 21:55:59 +12:00
David Birks
a89cb76fa0
docs: add missing comma to from an example in the router-context guide (#1579) 2024-05-10 19:49:24 +12:00
Tanner Linsley
e1f38f921f fix: rename react-router-server to start 😜 2024-05-08 16:51:45 -06:00
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