Skip to content

Commit 9ab7a2f

Browse files
committed
Merge branch 'main' into release-next
2 parents a00f3a0 + cb4450d commit 9ab7a2f

File tree

8 files changed

+43
-12
lines changed

8 files changed

+43
-12
lines changed

contributors.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
- 0xEddie
2+
- 3fuyang
23
- aarbi
34
- abdallah-nour
45
- abeadam
@@ -224,6 +225,7 @@
224225
- mathpaquette
225226
- matmilbury
226227
- matt-harro
228+
- matteogauthier
227229
- matthewlynch
228230
- maximevtush
229231
- maxpou
@@ -293,6 +295,7 @@
293295
- rtmann
294296
- rtzll
295297
- rubeonline
298+
- ruidi-huang
296299
- ryanflorence
297300
- ryanhiebert
298301
- saengmotmi
@@ -314,6 +317,7 @@
314317
- shivamsinghchahar
315318
- silvenon
316319
- SimenB
320+
- SirDaev
317321
- SkayuX
318322
- skratchdot
319323
- smff
@@ -365,6 +369,7 @@
365369
- valerii15298
366370
- ValiantCat
367371
- vdusart
372+
- vesan
368373
- VictorElHajj
369374
- vijaypushkin
370375
- vikingviolinist

docs/how-to/fetchers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ export function UserSearchCombobox() {
219219

220220
```tsx lines=[2,5]
221221
import { useFetcher } from "react-router";
222-
import type { Search } from "./search-users";
222+
import type { loader } from "./search-users";
223223

224224
export function UserSearchCombobox() {
225-
let fetcher = useFetcher<typeof Search.action>();
225+
let fetcher = useFetcher<typeof loader>();
226226
// ...
227227
}
228228
```
@@ -235,7 +235,7 @@ Ensure you use `import type` so you only import the types.
235235
import { useFetcher } from "react-router";
236236

237237
export function UserSearchCombobox() {
238-
let fetcher = useFetcher<typeof Search.action>();
238+
let fetcher = useFetcher<typeof loader>();
239239
return (
240240
<div>
241241
<fetcher.Form method="get" action="/search-users">
@@ -261,7 +261,7 @@ Note you will need to hit "enter" to submit the form and see the results.
261261
import { useFetcher } from "react-router";
262262

263263
export function UserSearchCombobox() {
264-
let fetcher = useFetcher<typeof Search.action>();
264+
let fetcher = useFetcher<typeof loader>();
265265
return (
266266
<div>
267267
<fetcher.Form method="get" action="/search-users">

docs/how-to/view-transitions.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,37 @@ The simplest way to enable view transitions is by adding the `viewTransition` pr
2020

2121
Without any additional CSS, this provides a basic cross-fade animation between pages.
2222

23+
### 2. Enable view transitions with programmatic navigation
24+
25+
When using programmatic navigation with the `useNavigate` hook, you can enable view transitions by passing the `viewTransition: true` option:
26+
27+
```tsx
28+
import { useNavigate } from "react-router";
29+
30+
function NavigationButton() {
31+
const navigate = useNavigate();
32+
33+
return (
34+
<button
35+
onClick={() =>
36+
navigate("/about", { viewTransition: true })
37+
}
38+
>
39+
About
40+
</button>
41+
);
42+
}
43+
```
44+
45+
This provides the same cross-fade animation as using the `viewTransition` prop on Link components.
46+
2347
For more information on using the View Transitions API, please refer to the ["Smooth transitions with the View Transition API" guide][view-transitions-guide] from the Google Chrome team.
2448

2549
## Image Gallery Example
2650

2751
Let's build an image gallery that demonstrates how to trigger and use view transitions. We'll create a list of images that expand into a detail view with smooth animations.
2852

29-
### 2. Create the image gallery route
53+
### 1. Create the image gallery route
3054

3155
```tsx filename=routes/image-gallery.tsx
3256
import { NavLink } from "react-router";
@@ -62,7 +86,7 @@ export default function ImageGalleryRoute() {
6286
}
6387
```
6488

65-
### 3. Add transition styles
89+
### 2. Add transition styles
6690

6791
Define view transition names and animations for elements that should transition smoothly between routes.
6892

@@ -98,7 +122,7 @@ Define view transition names and animations for elements that should transition
98122
}
99123
```
100124

101-
### 4. Create the image detail route
125+
### 3. Create the image detail route
102126

103127
The detail view needs to use the same view transition names to create a seamless animation.
104128

@@ -122,7 +146,7 @@ export default function ImageDetailsRoute({
122146
}
123147
```
124148

125-
### 5. Add matching transition styles for the detail view
149+
### 4. Add matching transition styles for the detail view
126150

127151
```css filename=app.css
128152
/* Match transition names from the list view */

docs/start/data/custom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ order: 8
99

1010
## Introduction
1111

12-
Instead of using `@react-router/dev`, you can integrate React Router's framework features (like loaders, actions, fetchers, etc.) into your own bundler and server abstractions with Data Mode..
12+
Instead of using `@react-router/dev`, you can integrate React Router's framework features (like loaders, actions, fetchers, etc.) into your own bundler and server abstractions with Data Mode.
1313

1414
## Client Rendering
1515

docs/start/data/data-loading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Data is provided to route components from route loaders:
1515
createBrowserRouter([
1616
{
1717
path: "/",
18-
loader: () => {
18+
loader: async () => {
1919
// return data from here
2020
return { records: await getSomeRecords() };
2121
},

docs/start/data/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ order: 9
55

66
# Testing
77

8-
You can use `createRoutesStub` in data and framework modes. Please refer to the [Testing Guide](../framework/testing.md).
8+
You can use `createRoutesStub` in data and framework modes. Please refer to the [Testing Guide](../framework/testing).

docs/tutorials/address-book.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ export default function SidebarLayout() {
688688

689689
👉 **Move route definitions under the sidebar layout**
690690

691-
We can define a `layout` route to automatically render the sidebar for all matched routes within in. This is basically what our `root` was, but now we can scope it to specific routes.
691+
We can define a `layout` route to automatically render the sidebar for all matched routes within it. This is basically what our `root` was, but now we can scope it to specific routes.
692692

693693
```ts filename=app/routes.ts lines=[4,9,12]
694694
import type { RouteConfig } from "@react-router/dev/routes";

packages/create-react-router/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## 7.6.0
44

5+
_No changes_
6+
57
## 7.5.3
68

79
_No changes_

0 commit comments

Comments
 (0)