Skip to content

Commit 4c18a66

Browse files
ci: apply automated fixes
1 parent d7d9d4e commit 4c18a66

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

docs/router/framework/react/how-to/migrate-from-react-router.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,12 @@ export const Route = createFileRoute('/posts/$postId/edit')({
247247

248248
function EditPost() {
249249
const navigate = useNavigate()
250-
250+
251251
const handleSubmit = async (formData) => {
252252
const result = await updatePost(params.postId, formData)
253253
navigate({ to: '/posts/$postId', params: { postId } })
254254
}
255-
255+
256256
return <form onSubmit={handleSubmit}>{/* form */}</form>
257257
}
258258
```
@@ -282,11 +282,11 @@ TanStack Router has built-in SSR capabilities. Set up your router for SSR:
282282
import { createRouter } from '@tanstack/react-router'
283283
import { routeTree } from './routeTree.gen'
284284

285-
const router = createRouter({
285+
const router = createRouter({
286286
routeTree,
287287
context: {
288288
// Add any SSR context here
289-
}
289+
},
290290
})
291291

292292
declare module '@tanstack/react-router' {
@@ -709,16 +709,16 @@ Before deploying your migrated application:
709709

710710
## React Router v7 vs TanStack Router Feature Comparison
711711

712-
| Feature | React Router v7 | TanStack Router |
713-
|---------|----------------|-----------------|
714-
| Type Safety | Good | Excellent |
715-
| File-based Routing | Framework mode only | Built-in |
716-
| Search Params | Basic | Validated with schemas |
717-
| Code Splitting | Good | Excellent with lazy routes |
718-
| SSR | Framework mode | Built-in with TanStack Start |
719-
| Bundle Size | Larger | Smaller |
720-
| Learning Curve | Moderate | Moderate |
721-
| Community | Large | Growing |
712+
| Feature | React Router v7 | TanStack Router |
713+
| ------------------ | ------------------- | ---------------------------- |
714+
| Type Safety | Good | Excellent |
715+
| File-based Routing | Framework mode only | Built-in |
716+
| Search Params | Basic | Validated with schemas |
717+
| Code Splitting | Good | Excellent with lazy routes |
718+
| SSR | Framework mode | Built-in with TanStack Start |
719+
| Bundle Size | Larger | Smaller |
720+
| Learning Curve | Moderate | Moderate |
721+
| Community | Large | Growing |
722722

723723
---
724724

@@ -729,7 +729,7 @@ After successfully migrating to TanStack Router, consider these enhancements:
729729
### Advanced Features to Explore
730730

731731
- **Route-based code splitting** - Improve performance with lazy loading
732-
- **Search parameter validation** - Type-safe URL state management
732+
- **Search parameter validation** - Type-safe URL state management
733733
- **Route preloading** - Enhance perceived performance
734734
- **Route masking** - Advanced URL management
735735
- **Integration with TanStack Query** - Powerful data fetching
@@ -743,4 +743,4 @@ After successfully migrating to TanStack Router, consider these enhancements:
743743
- [Navigation Guide](../guide/navigation.md) - Complete navigation patterns
744744
- [Search Parameters Guide](../guide/search-params.md) - Advanced search param usage
745745
- [Type Safety Guide](../guide/type-safety.md) - TypeScript integration details
746-
- [React Router v7 Changelog](https://reactrouter.com/start/changelog) - What changed in v7
746+
- [React Router v7 Changelog](https://reactrouter.com/start/changelog) - What changed in v7

0 commit comments

Comments
 (0)