Skip to content

Commit 6d619da

Browse files
docs(examples): standardize the READMEs for the React examples (#6014)
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
1 parent 60eb86e commit 6d619da

File tree

56 files changed

+2232
-593
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2232
-593
lines changed

examples/react/authenticated-routes-firebase/README.md

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
# Firebase Setup
1+
# TanStack Router - Authenticated Routes with Firebase Example
2+
3+
An example demonstrating authentication with Firebase and protected routes.
4+
5+
- [TanStack Router Docs](https://tanstack.com/router)
6+
- [Firebase Documentation](https://firebase.google.com/docs)
7+
8+
## Start a new project based on this example
9+
10+
To start a new project based on this example, run:
11+
12+
```sh
13+
npx gitpick TanStack/router/tree/main/examples/react/authenticated-routes-firebase authenticated-routes-firebase
14+
```
15+
16+
## Firebase Setup
217

318
1. Create a [Firebase project](https://console.firebase.google.com/)
419
1. By default, firebase will configure an accepted domain for localhost...update if necessary!
@@ -22,19 +37,46 @@
2237

2338
## Setup .env.local
2439

25-
Copy the .env.example provided and configure with your firebase credentials
40+
Copy the .env.example provided and configure with your firebase credentials:
2641

27-
````VITE_FIREBASE_API_KEY=
42+
```
43+
VITE_FIREBASE_API_KEY=
2844
VITE_FIREBASE_AUTH_DOMAIN=
2945
VITE_FIREBASE_PROJECT_ID=
3046
VITE_FIREBASE_STORAGE_BUCKET=
3147
VITE_FIREBASE_MESSAGING_SENDER_ID=
32-
VITE_FIREBASE_APP_ID=```
48+
VITE_FIREBASE_APP_ID=
49+
```
50+
51+
## Getting Started
52+
53+
Install dependencies:
54+
55+
```sh
56+
pnpm install
57+
```
58+
59+
Start the development server:
60+
61+
```sh
62+
pnpm dev
63+
```
64+
65+
## Build
66+
67+
Build for production:
68+
69+
```sh
70+
pnpm build
71+
```
3372

34-
## Run the app
73+
## About This Example
3574

36-
To run this example:
75+
This example demonstrates:
3776

38-
- `npm install` or `yarn`
39-
- `npm start` or `yarn start`
40-
````
77+
- Firebase authentication integration
78+
- Protected routes with Firebase Auth
79+
- Route guards
80+
- Login/logout with Firebase
81+
- User session management
82+
- Public vs private routes
Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,46 @@
1-
# Example
1+
# TanStack Router - Authenticated Routes Example
22

3-
To run this example:
3+
An example demonstrating authentication and protected routes.
44

5-
- `npm install` or `yarn`
6-
- `npm start` or `yarn start`
5+
- [TanStack Router Docs](https://tanstack.com/router)
6+
7+
## Start a new project based on this example
8+
9+
To start a new project based on this example, run:
10+
11+
```sh
12+
npx gitpick TanStack/router/tree/main/examples/react/authenticated-routes authenticated-routes
13+
```
14+
15+
## Getting Started
16+
17+
Install dependencies:
18+
19+
```sh
20+
pnpm install
21+
```
22+
23+
Start the development server:
24+
25+
```sh
26+
pnpm dev
27+
```
28+
29+
## Build
30+
31+
Build for production:
32+
33+
```sh
34+
pnpm build
35+
```
36+
37+
## About This Example
38+
39+
This example demonstrates:
40+
41+
- Authentication flow
42+
- Protected routes
43+
- Route guards
44+
- Login/logout functionality
45+
- Redirect after authentication
46+
- Public vs private routes
Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
1-
# Example
1+
# TanStack Router - Default Search Params Example
22

3-
To run this example:
3+
An example demonstrating default search parameters.
44

5-
- `npm install` or `yarn`
6-
- `npm start` or `yarn start`
5+
- [TanStack Router Docs](https://tanstack.com/router)
6+
7+
## Start a new project based on this example
8+
9+
To start a new project based on this example, run:
10+
11+
```sh
12+
npx gitpick TanStack/router/tree/main/examples/react/basic-default-search-params basic-default-search-params
13+
```
14+
15+
## Getting Started
16+
17+
Install dependencies:
18+
19+
```sh
20+
pnpm install
21+
```
22+
23+
Start the development server:
24+
25+
```sh
26+
pnpm dev
27+
```
28+
29+
## Build
30+
31+
Build for production:
32+
33+
```sh
34+
pnpm build
35+
```
36+
37+
## About This Example
38+
39+
This example demonstrates:
40+
41+
- Default search parameter values
42+
- Type-safe search params
43+
- Search param validation
44+
- URL state management
Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
1-
# Example
1+
# TanStack Router - DevTools Panel Example
22

3-
To run this example:
3+
An example demonstrating the TanStack Router DevTools panel.
44

5-
- `npm install` or `yarn`
6-
- `npm start` or `yarn start`
5+
- [TanStack Router Docs](https://tanstack.com/router)
6+
7+
## Start a new project based on this example
8+
9+
To start a new project based on this example, run:
10+
11+
```sh
12+
npx gitpick TanStack/router/tree/main/examples/react/basic-devtools-panel basic-devtools-panel
13+
```
14+
15+
## Getting Started
16+
17+
Install dependencies:
18+
19+
```sh
20+
pnpm install
21+
```
22+
23+
Start the development server:
24+
25+
```sh
26+
pnpm dev
27+
```
28+
29+
## Build
30+
31+
Build for production:
32+
33+
```sh
34+
pnpm build
35+
```
36+
37+
## About This Example
38+
39+
This example demonstrates:
40+
41+
- TanStack Router DevTools integration
42+
- DevTools panel configuration
43+
- Route debugging
44+
- State inspection
Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
1-
# Example
1+
# TanStack Router - File-Based Routing Example
22

3-
To run this example:
3+
An example demonstrating file-based routing with TanStack Router.
44

5-
- `npm install` or `yarn`
6-
- `npm start` or `yarn start`
5+
- [TanStack Router Docs](https://tanstack.com/router)
6+
7+
## Start a new project based on this example
8+
9+
To start a new project based on this example, run:
10+
11+
```sh
12+
npx gitpick TanStack/router/tree/main/examples/react/basic-file-based basic-file-based
13+
```
14+
15+
## Getting Started
16+
17+
Install dependencies:
18+
19+
```sh
20+
pnpm install
21+
```
22+
23+
Start the development server:
24+
25+
```sh
26+
pnpm dev
27+
```
28+
29+
## Build
30+
31+
Build for production:
32+
33+
```sh
34+
pnpm build
35+
```
36+
37+
## About This Example
38+
39+
This example demonstrates:
40+
41+
- File-based route generation
42+
- Automatic route tree creation
43+
- Route file conventions
44+
- Type-safe routing with file-based routes
Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
1-
# Example
1+
# TanStack Router - Non-Nested DevTools Example
22

3-
To run this example:
3+
An example demonstrating TanStack Router DevTools in a non-nested configuration.
44

5-
- `npm install` or `yarn`
6-
- `npm start` or `yarn start`
5+
- [TanStack Router Docs](https://tanstack.com/router)
6+
7+
## Start a new project based on this example
8+
9+
To start a new project based on this example, run:
10+
11+
```sh
12+
npx gitpick TanStack/router/tree/main/examples/react/basic-non-nested-devtools basic-non-nested-devtools
13+
```
14+
15+
## Getting Started
16+
17+
Install dependencies:
18+
19+
```sh
20+
pnpm install
21+
```
22+
23+
Start the development server:
24+
25+
```sh
26+
pnpm dev
27+
```
28+
29+
## Build
30+
31+
Build for production:
32+
33+
```sh
34+
pnpm build
35+
```
36+
37+
## About This Example
38+
39+
This example demonstrates:
40+
41+
- TanStack Router DevTools
42+
- Non-nested DevTools configuration
43+
- Alternative DevTools placement
44+
- DevTools customization
Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,46 @@
1-
# Example
1+
# TanStack Router - React Query File-Based Example
22

3-
To run this example:
3+
An example combining file-based routing with TanStack Query integration.
44

5-
- `npm install` or `yarn`
6-
- `npm start` or `yarn start`
5+
- [TanStack Router Docs](https://tanstack.com/router)
6+
- [TanStack Query Docs](https://tanstack.com/query)
7+
8+
## Start a new project based on this example
9+
10+
To start a new project based on this example, run:
11+
12+
```sh
13+
npx gitpick TanStack/router/tree/main/examples/react/basic-react-query-file-based basic-react-query-file-based
14+
```
15+
16+
## Getting Started
17+
18+
Install dependencies:
19+
20+
```sh
21+
pnpm install
22+
```
23+
24+
Start the development server:
25+
26+
```sh
27+
pnpm dev
28+
```
29+
30+
## Build
31+
32+
Build for production:
33+
34+
```sh
35+
pnpm build
36+
```
37+
38+
## About This Example
39+
40+
This example demonstrates:
41+
42+
- File-based routing with TanStack Router
43+
- TanStack Query integration
44+
- Type-safe data fetching
45+
- Automatic route generation
46+
- Query-based data loading per route

0 commit comments

Comments
 (0)