0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/examples/react/start-basic-react-query
Sean Cassiere 16705fab53
fix: resolve custom client and server entry paths (#4172)
This PR fixes it, so that a user can define a custom framework entry for both
the `client` and `server` (in either `src/client.tsx` or `src/server.tsx`).

This PR also removes the unneeded `src/server.ts` files present as part of the
`devinxi` migration.

Additionally, the React client entry has been change to wrap `hydrateRoot`
with `startTransition`. This change useful, since after the SSR-rendered
markup is sent to the client, `startTransition` lets React know to defer the
hydration in favor of user events.

fixes #4138
History 2025-05-15 16:04:03 +12:00
..
.tanstack-start/server-routes Devinxi (#4111) 2025-05-10 14:54:51 +02:00
.vscode chore(examples): add .vscode/settings.json configuration (#3349) 2025-02-07 10:29:48 +13:00
public feat: New Serialization Paradigm (#1824) 2024-06-28 09:45:01 -06:00
src fix: resolve custom client and server entry paths (#4172) 2025-05-15 16:04:03 +12:00
.gitignore Devinxi (#4111) 2025-05-10 14:54:51 +02:00
.prettierignore chore(examples): cleanup the deps for the start examples (#2388) 2024-09-21 22:21:59 +12:00
package.json release: v1.120.4-alpha.17 2025-05-14 23:00:08 +00:00
postcss.config.mjs chore(e2e,examples): downgrade to tailwindcss 3 (#3249) 2025-01-27 13:28:27 +13:00
README.md Add Netlify callouts 2024-12-24 10:49:18 -07:00
tailwind.config.mjs chore: move start e2e and example projects from ./app to ./src (#3712) 2025-03-09 23:35:20 +01:00
tsconfig.json chore: move start e2e and example projects from ./app to ./src (#3712) 2025-03-09 23:35:20 +01:00
vite.config.ts Devinxi (#4111) 2025-05-10 14:54:51 +02:00

Welcome to TanStack.com!

This site is built with TanStack Router!

It's deployed automagically with Netlify!

Development

From your terminal:

pnpm install
pnpm dev

This starts your app in development mode, rebuilding assets on file changes.

Editing and previewing the docs of TanStack projects locally

The documentations for all TanStack projects except for React Charts are hosted on https://tanstack.com, powered by this TanStack Router app. In production, the markdown doc pages are fetched from the GitHub repos of the projects, but in development they are read from the local file system.

Follow these steps if you want to edit the doc pages of a project (in these steps we'll assume it's TanStack/form) and preview them locally :

  1. Create a new directory called tanstack.
mkdir tanstack
  1. Enter the directory and clone this repo and the repo of the project there.
cd tanstack
git clone git@github.com:TanStack/tanstack.com.git
git clone git@github.com:TanStack/form.git

Note

Your tanstack directory should look like this:

tanstack/
   |
   +-- form/
   |
   +-- tanstack.com/

Warning

Make sure the name of the directory in your local file system matches the name of the project's repo. For example, tanstack/form must be cloned into form (this is the default) instead of some-other-name, because that way, the doc pages won't be found.

  1. Enter the tanstack/tanstack.com directory, install the dependencies and run the app in dev mode:
cd tanstack.com
pnpm i
# The app will run on https://localhost:3000 by default
pnpm dev
  1. Now you can visit http://localhost:3000/form/latest/docs/overview in the browser and see the changes you make in tanstack/form/docs.

Note

The updated pages need to be manually reloaded in the browser.

Warning

You will need to update the docs/config.json file (in the project's repo) if you add a new doc page!