Skip to content

Commit

Permalink
docs: add more installation details to getting started with TanStack …
Browse files Browse the repository at this point in the history
…Start guide (#2016)

* Add details to getting started with Start.

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
thomasballinger and autofix-ci[bot] authored Jul 24, 2024
1 parent 2c5452e commit 789c466
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion docs/framework/react/guide/tanstack-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@ Follow this guide to build a basic TanStack Start web application. Together, we

[Here is what that will look like](https://stackblitz.com/github/tanstack/router/tree/main/examples/react/start-basic-counter)

Create a new project if you're starting fresh.

```shell
mkdir myApp
cd myApp
npm init -y
```

Create a `tsconfig.json` file with at least the following settings:

```jsonc
{
"compilerOptions": {
"jsx": "react-jsx",
"moduleResolution": "Bundler",
"module": "Preserve",
"target": "ES2022",
"skipLibCheck": true,
},
}
```

# Install Dependencies

TanStack Start is powered by [Vinxi](https://vinxi.vercel.app/) and [TanStack Router](https://tanstack.com/router) and requires them as dependencies.
Expand All @@ -29,13 +51,26 @@ To install them, run:
npm i @tanstack/start @tanstack/react-router vinxi
```

You'll also need React and the Vite React plugin, so install them too:

```shell
npm i react react-dom @vitejs/plugin-react
```

and some TypeScript:

```shell
npm i -D typescript @types/react @types/react-dom
```

# Update Configuration Files

We'll then update our `package.json` to reference the new Vinxi entry point:
We'll then update our `package.json` to reference the new Vinxi entry point and set `"type": "module"`:

```json
{
"//": "...",
"type": "module"
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
Expand Down

0 comments on commit 789c466

Please sign in to comment.