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

881 commits

Author SHA1 Message Date
Andy Kiesler
144a33c48e
docs(router): normalize heading level for "Effect" in search guide (#4100) 2025-05-07 10:56:27 +12:00
Miro Rauhala
f0dbf0a124
docs(router): update working in the "route-trees" guide (#4091) 2025-05-06 10:38:59 +12:00
Ilya Komichev
409252e947
docs(start): fix typos in logos (#4090) 2025-05-06 10:15:09 +12:00
Shruti Kapoor
ba8a1c836d
Adding Tutorial for Reading and Writing a File (#4089)
# Add DevJokes Tutorial: Reading and Writing Files
<img width="1318" alt="image"
src="https://github.com/user-attachments/assets/e6284dea-9596-42e5-b37a-c29ed56fa934"
/>

## Description
Adds a tutorial showing how to build a full-stack DevJokes app with
TanStack Start. Users learn to create server functions for reading and
writing to files, build React components, and implement data fetching
with TanStack Router.

## Key Features
- Server functions with `createServerFn`
- File-based data storage with Node.js `fs`
- Form handling and data validation
- Data refreshing with `router.invalidate()`
- Complete UI with Tailwind CSS

## Demo
https://youtu.be/zd0rtKbtlgU

## Reference
Complete code available at: https://github.com/shrutikapoor08/devjokes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-05-05 08:23:49 -06:00
Chukwuka Morka
191a1c8a2b
docs(router): walkthrough on using the ignore prefix for component colocation in the routing-concepts guide (#4075)
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-05-02 10:17:05 +12:00
Chukwuka Morka
5e08ac5d74
docs(router): add ignore prefix into the file naming conventions guide (#4074)
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-05-02 10:16:52 +12:00
Max Zhang
eb649e79de
docs(start): fix typos in the hosting guide (#4073) 2025-05-01 14:26:59 +12:00
Ionut-Cristian Florescu
285cff7bbd
docs(start): fix key on changing the base path for API routes (#4062) 2025-04-30 18:35:26 +12:00
Leonardo Montini
413a56a347
docs: fix broken link (#4055) 2025-04-26 21:05:15 +02:00
SeanCassiere
7ab6f5694f
docs(router): update link to create-tsrouter-app options 2025-04-25 19:09:37 +12:00
Tanner Linsley
fff694147b
Update overview.md 2025-04-23 15:20:59 -06:00
Tanner Linsley
bbbcb9c6ff
Update overview.md 2025-04-23 13:12:44 -06:00
Mikaël Sévigny
431dec2c26
docs(start): remove trailing commas from "build-from-scratch" (#4029)
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-23 13:22:58 +12:00
Matthew Pirocchi
d57f9f5cc6
docs(start): complete the server functions - mutation example (#3992)
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-17 20:13:24 +12:00
M. Fahad Sohail
afbeb9ea16
docs(router): fix broken links on the file-naming-conventions guide (#3998)
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-17 20:04:46 +12:00
FatahChan
8085969ae3
docs(router): list "parallel routes" in the comparison (#3995) 2025-04-16 09:31:52 +12:00
Fitim Bytyqi
9a4af7cf91
docs: improves react/solid quick-start docs (#3994)
addition fixes from #3961
2025-04-15 01:38:51 +02:00
Ezekiel Keator
3cba9989d2
docs: correct start server git link (#3991) 2025-04-14 19:55:22 +02:00
Seongbin Kim
112438412c
docs(router): broken link to "SSR" from "Deferred Data Loading" guide (#3984) 2025-04-14 09:11:21 +12:00
Yiwan
d4a4e96b62
docs(router): add comment for vite plugin order (#3986)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-14 09:10:42 +12:00
Zac Rosenbauer
f0138f80b0
feat(react-router): Export ClientOnly (#3969)
Exposes the `ClientOnly` component for preventing rendering & hydration
errors.

## Background

When you attempt to prevent content from rendering using something like
`typeof document !== 'undefined'` as that type of conditional will cause
hydration errors.

## API

```tsx
import { ClientOnly, createRoute } from '@tanstack/react-router'
import { Charts, FallbackCharts } from './charts-that-break-server-side-rendering'

const Route = createRoute({
  // ... other route options
  path: '/dashboard',
  component: Dashboard,
})

function Dashboard() {
  return (
    <div>
      <p>Dashboard</p>
      <ClientOnly fallback={<FallbackCharts />}>
        <Charts />
      </ClientOnly>
    </div>
  )
}
```

> [!NOTE]
> This component as is (other than I removed the `children` as a
`function`) in production on [joggr.io](https://joggr.io)

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Co-authored-by: Ahmed Abdelbaset <A7med3bdulBaset@gmail.com>
Co-authored-by: Birk Skyum <birk.skyum@pm.me>
2025-04-13 10:50:44 +02:00
Nick Nisi
f9c343e0b5
chore(examples): add TanStack Start WorkOS example (#3966)
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-10 20:41:57 +12:00
Fitim Bytyqi
09e87448b5
docs: devtools installation (#3961)
Edits the way devtools are installed
2025-04-08 13:02:00 +02:00
Marvin ROGER
30c49e1328
fix(router-core): search parsing of + using URLSearchParams (#3894)
Closes #3655

Switch out our `qss` implementation from its manual solution
over to using `URLSearchParams` for handling
encoding/decoding while still retaining the same interface.

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-04-06 16:23:28 +12:00
Kid
d1e78bb5f6
docs(router): fix broken link to example in authenticated routes guide (#3937) 2025-04-05 13:53:14 +13:00
Tanner Linsley
359d19a115 Update partners 2025-04-04 13:29:24 -06:00
TN
37fc7e82df
docs: Update scroll-restoration.md (#3934)
Fix typo
2025-04-04 01:35:41 +02:00
Ehtisham Sajjad
dbfea0d08c
docs(router): simplify route variable naming in search params guide (#3890)
In the "search params" guide, the usage of the variable
`allProductsRoute` has been changed to `Route` in the code-block
examples for consistency and clarity.
This makes the examples easier to follow since `Route` is used
throughout the rest of the documentation.
2025-04-02 09:07:41 +13:00
Diego Garcia Brisa
eab355aa69
docs: Fix HeadContent docs (#3905)
## Changes

1. **Fix createRootRoute syntax**: Updated all examples in the document
head management guide to use the correct `createRootRoute({...})` syntax
instead of the incorrect `createRootRoute()({...})` syntax.

2. **Fix HeadContent placement**: The previous commit corrected the code
example for Single-Page Applications to properly show the correct syntax
for creating a root route with HeadContent.

## Why these changes matter

- The incorrect syntax examples could lead to confusion for developers
implementing document head management in their applications
- These fixes ensure consistency throughout the documentation and
provide developers with the correct implementation patterns
- Proper documentation helps reduce support requests and improves
developer experience

## Technical details

- Fixed 5 instances of incorrect `createRootRoute()({...})` syntax
throughout the document
- Previously fixed the SPA example which had an incorrect API reference

These changes ensure that all code examples in the document head
management guide are correct and consistent with the actual API
implementation.
2025-04-01 10:21:46 +02:00
Redbird10
1bbe4a062a
docs(router): correct ReturnType of Router.matchRoute to match the runtime output (#3896)
The `.matchRoute` method on the Router type page previously stated it
returns a `RouteMatch` object. In reality, it returns only the route
match's params.

This update corrects the return type in docs to reflect actual behavior.

Fix #3875
2025-04-01 11:13:23 +13:00
Adam
1f2e243530
docs(start): add note on needing variable export named as APIRoute (#3892)
Just a quick note to prevent hitting 404s where the export needs to be named `APIRoute`.

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-03-31 21:23:31 +13:00
SeanCassiere
ab0173dddb
docs(start): update the list to the router examples 2025-03-30 00:29:39 +13:00
Maradona Morais
f1b2d001fa
docs(router): fix _pathlessLayout example of file-based routing (#3877)
The `_pathlessLayout.tsx` should be the same name as the directory
`_pathlessLayout` in order to be applied as Layout for `route-a` and
`route-b` routes
2025-03-28 18:52:54 +01:00
Neeraj Dalal
3652b3529d
docs(start): switch from degit to gitpick (#3863)
Degit is both slower and has some odd caching behaviour on the user's machine.
Gitpick is faster and conforms to more native github URLs.
2025-03-28 05:09:44 +13:00
Birk Skyum
7155c42e9e
chore(docs): fix escaping of brackets in solid overview page (#3866)
addressing
https://github.com/TanStack/router/pull/3864#discussion_r2015283936
2025-03-27 03:34:58 +01:00
Birk Skyum
739362f1f9
release experimental @tanstack/solid-start package (#3864)
Mentions of this being experimental in
- overview page (first in the docs)
- readme of solid-start package

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-27 01:19:57 +01:00
Agus Setya R
6b1f3c163e
fix(docs): Update link for the The Router Configuration: Preloading & Caching (#3833)
There are broken links in the Tanstack Start "Build from Scratch: The
Router Configuration" section.
I believe this should goes into Tanstack Router documentation.
2025-03-26 17:13:53 +01:00
Matthew Sperry
025ef40748
docs: fix create-tsrouter-app command (#3829)
I ran into errors trying to use the npm and yarn commands listed here,
so I looked at https://github.com/TanStack/create-tsrouter-app and it
appears you should use npx with the `--package-manager` option to
specify npm/yarn/etc.

I see the doc was updated in
https://github.com/TanStack/router/pull/3759/files#diff-32b91344fa0565552fb394a3166cbdebd81afa9d02ffec1ed2c1d055ebad46a9,
I assume that was the old way to create a project but feel free to edit
or close this PR if there's a better way to document this, thanks.
2025-03-26 17:12:50 +01:00
SeanCassiere
291667dea9
docs(react-router,solid-router): add missing hash to the faq 2025-03-21 17:05:46 +13:00
Sean Cassiere
bfa90f7403
docs(react-router,solid-router): add a FAQ section (#3822) 2025-03-21 16:50:56 +13:00
Sean Cassiere
906525964d
docs(start): move router configuration note to the top (#3819) 2025-03-21 11:38:26 +13:00
seab
020c4c2d1d
docs: typo fix (#3806) 2025-03-18 21:44:40 +00:00
Daniel
3a0c6dd019
docs(start): fix broken url to the start-counter example (#3795)
Fix wrong url for start-counter example

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-03-18 05:16:08 +13:00
Alex D'Elia
bf5005f17d
docs(react-router): add view transitions example (#3791)
React example showing off view transitions at work.

---

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2025-03-17 14:25:29 +13:00
Alex Tirim
c1baf7733c
[DOCS] : Fix wrong getting started command (#3788) 2025-03-16 10:41:11 +00:00
James Chung
4568b38b69
docs: typo in the "external-data-loading" guide (#3772) 2025-03-15 18:01:48 +13:00
branko-slavkov
869ec3baa6
docs: Update useBlockerHook.md (#3767) 2025-03-13 23:56:02 +01:00
Birk Skyum
83783cbe97
fix(router-docs): update notes on devtools in quickstart guide (#3769)
Closes https://github.com/TanStack/router/issues/3756
2025-03-13 22:13:58 +01:00
Birk Skyum
378720862a
docs(quickstart): use create-tsrouter-app for scaffolding a tsrouter app (#3759)
This use the new create-tsrouter-app to scaffold tsrouter apps.

On this quickstart page
https://tanstack.com/router/latest/docs/framework/react/quick-start
https://tanstack.com/router/latest/docs/framework/solid/quick-start
2025-03-12 23:31:28 +01:00
autofix-ci[bot]
a73dcdcec3
ci: apply automated fixes 2025-03-12 15:50:19 +00:00