Skip to content

Commit 20ea994

Browse files
docs: fix links for decisions on dx (#5608)
fix links
1 parent c6183ad commit 20ea994

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/router/framework/react/decisions-on-dx.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ Every aspect of TanStack Router is designed to be as type-safe as possible, and
2828

2929
But to achieve this, we had to make some decisions that deviate from the norms in the routing world.
3030

31-
1. [**Route configuration boilerplate?**](#1-why-is-the-routers-configuration-done-this-way): You have to define your routes in a way that allows TypeScript to infer the types of your routes as much as possible.
32-
2. [**TypeScript module declaration for the router?**](#2-declaring-the-router-instance-for-type-inference): You have to pass the `Router` instance to the rest of your application using TypeScript's module declaration.
33-
3. [**Why push for file-based routing over code-based?**](#3-why-is-file-based-routing-the-preferred-way-to-define-routes): We push for file-based routing as the preferred way to define your routes.
31+
1. [**Route configuration boilerplate?**](#why-is-the-routers-configuration-done-this-way): You have to define your routes in a way that allows TypeScript to infer the types of your routes as much as possible.
32+
2. [**TypeScript module declaration for the router?**](#declaring-the-router-instance-for-type-inference): You have to pass the `Router` instance to the rest of your application using TypeScript's module declaration.
33+
3. [**Why push for file-based routing over code-based?**](#why-is-file-based-routing-the-preferred-way-to-define-routes): We push for file-based routing as the preferred way to define your routes.
3434

3535
> TLDR; All the design decisions in the developer experience of using TanStack Router are made so that you can have a best-in-class type-safety experience without compromising on the control, flexibility, and maintainability of your route configurations.
3636
37-
## 1. Why is the Router's configuration done this way?
37+
## Why is the Router's configuration done this way?
3838

3939
When you want to leverage the TypeScript's inference features to its fullest, you'll quickly realize that _Generics_ are your best friend. And so, TanStack Router uses Generics everywhere to ensure that the types of your routes are inferred as much as possible.
4040

@@ -93,9 +93,9 @@ What we found to be the best way to define your routes is to abstract the defini
9393
You can read more about [code-based routing](../routing/code-based-routing.md) to see how to define your routes in this way.
9494

9595
> [!TIP]
96-
> Finding Code-based routing to be a bit too cumbersome? See why [file-based routing](#3-why-is-file-based-routing-the-preferred-way-to-define-routes) is the preferred way to define your routes.
96+
> Finding Code-based routing to be a bit too cumbersome? See why [file-based routing](#why-is-file-based-routing-the-preferred-way-to-define-routes) is the preferred way to define your routes.
9797
98-
## 2. Declaring the Router instance for type inference
98+
## Declaring the Router instance for type inference
9999

100100
> Why do I have to declare the `Router`?
101101
@@ -151,7 +151,7 @@ export const PostsIdLink = () => {
151151

152152
We went with **module declaration**, as it is what we found to be the most scalable and maintainable approach with the least amount of overhead and boilerplate.
153153

154-
## 3. Why is file-based routing the preferred way to define routes?
154+
## Why is file-based routing the preferred way to define routes?
155155

156156
> Why are the docs pushing for file-based routing?
157157

docs/router/framework/react/installation/migrate-from-react-location.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ React Location and TanStack Router share much of same design decisions concepts,
1111
- React Location uses _generics_ to infer types for routes, while TanStack Router uses _module declaration merging_ to infer types.
1212
- Route configuration in React Location is done using a single array of route definitions, while in TanStack Router, route configuration is done using a tree of route definitions starting with the [root route](../routing/routing-concepts.md#the-root-route).
1313
- [File-based routing](../routing/file-based-routing.md) is the recommended way to define routes in TanStack Router, while React Location only allows you to define routes in a single file using a code-based approach.
14-
- TanStack Router does support a [code-based approach](../routing/code-based-routing.md) to defining routes, but it is not recommended for most use cases. You can read more about why, over here: [why is file-based routing the preferred way to define routes?](../decisions-on-dx.md#3-why-is-file-based-routing-the-preferred-way-to-define-routes)
14+
- TanStack Router does support a [code-based approach](../routing/code-based-routing.md) to defining routes, but it is not recommended for most use cases. You can read more about why, over here: [why is file-based routing the preferred way to define routes?](../decisions-on-dx.md#why-is-file-based-routing-the-preferred-way-to-define-routes)
1515

1616
## Migration guide
1717

0 commit comments

Comments
 (0)