Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/start/framework/react/fetching-external-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ At this point, the project structure should look like this:
│ ├── routeTree.gen.ts # Generated route tree
│ └── styles.css # Global styles
├── public/ # Static assets
├── app.config.ts # TanStack Start configuration
├── vite.config.ts # TanStack Start configuration
├── package.json # Project dependencies
└── tsconfig.json # TypeScript configuration

Expand Down
6 changes: 3 additions & 3 deletions docs/start/framework/react/path-aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ After updating your `tsconfig.json` file, you'll need to install the `vite-tscon
npm install -D vite-tsconfig-paths
```

Now, you'll need to update your `app.config.ts` file to include the following:
Now, you'll need to update your `vite.config.ts` file to include the following:

```ts
// app.config.ts
import { defineConfig } from '@tanstack/react-start/config'
// vite.config.ts
import { defineConfig } from 'vite'
import viteTsConfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
Expand Down
2 changes: 1 addition & 1 deletion docs/start/framework/react/reading-writing-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ At this point, the project structure should look like this -
│ ├── ssr.tsx # Server-side rendering
│ └── styles.css # Global styles
├── public/ # Static assets
├── app.config.ts # TanStack Start configuration
├── vite.config.ts # TanStack Start configuration
├── package.json # Project dependencies
└── tsconfig.json # TypeScript configuration
```
Expand Down
19 changes: 6 additions & 13 deletions docs/start/framework/react/server-routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,7 @@ Sometimes you may need to set headers in the response. You can do this by either
```ts
// routes/hello.ts
import { createFileRoute } from '@tanstack/react-router'
```

> > > > > > > 582e8c7a1 (docs: Start overhaul)
> > > > > > > export const Route = createFileRoute('/hello')({

export const Route = createFileRoute('/hello')({
server: {
handlers: {
GET: async ({ request }) => {
Expand All @@ -469,13 +465,10 @@ Sometimes you may need to set headers in the response. You can do this by either
},
},
},

})

// Visit /hello to see the response
// Hello, World!

````
})
// Visit /hello to see the response
// Hello, World!
```

- Or using the `setResponseHeaders` helper function from `@tanstack/react-start/server`.

Expand All @@ -496,4 +489,4 @@ export const Route = createFileRoute('/hello')({
},
},
})
````
```
Loading
Loading