Skip to content

Commit b000b21

Browse files
committed
Merge branch 'main' into release-next
2 parents b579661 + 94f7fb7 commit b000b21

File tree

7 files changed

+50
-29
lines changed

7 files changed

+50
-29
lines changed

.github/workflows/release-experimental.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1-
name: 🚀 Release (experimental)
1+
name: 🧪 Experimental Release
2+
23
on:
3-
push:
4-
tags:
5-
- "v0.0.0-experimental*"
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
required: true
68

79
concurrency: ${{ github.workflow }}-${{ github.ref }}
810

911
env:
1012
CI: true
1113

1214
jobs:
13-
release:
14-
name: 🧑‍🔬 Experimental Release
15-
if: |
16-
github.repository == 'remix-run/react-router' &&
17-
contains(github.ref, 'experimental')
15+
experimental:
16+
name: 🧪 Experimental Release
17+
if: github.repository == 'remix-run/react-router'
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: ⬇️ Checkout repo
2121
uses: actions/checkout@v4
2222
with:
23+
ref: ${{ github.event.inputs.branch }}
24+
# checkout using a custom token so that we can push later on
25+
token: ${{ secrets.GITHUB_TOKEN }}
2326
fetch-depth: 0
2427

2528
- name: 📦 Setup pnpm
@@ -28,12 +31,22 @@ jobs:
2831
- name: ⎔ Setup node
2932
uses: actions/setup-node@v4
3033
with:
31-
cache: pnpm
3234
node-version-file: ".nvmrc"
35+
cache: "pnpm"
3336

3437
- name: 📥 Install deps
3538
run: pnpm install --frozen-lockfile
3639

40+
- name: ⤴️ Update version
41+
run: |
42+
git config --local user.email "[email protected]"
43+
git config --local user.name "Remix Run Bot"
44+
SHORT_SHA=$(git rev-parse --short HEAD)
45+
NEXT_VERSION=0.0.0-experimental-${SHORT_SHA}
46+
git checkout -b experimental/${NEXT_VERSION}
47+
pnpm run version ${NEXT_VERSION}
48+
git push origin --tags
49+
3750
- name: 🏗 Build
3851
run: pnpm build
3952

contributors.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
- chensokheng
5050
- chrisngobanh
5151
- christopherchudzicki
52+
- ChristophP
5253
- christowiz
5354
- codeape2
5455
- coryhouse
@@ -60,6 +61,7 @@
6061
- david-bezero
6162
- david-crespo
6263
- decadentsavant
64+
- dgrijuela
6365
- DigitalNaut
6466
- dmitrytarassov
6567
- dokeet
@@ -75,6 +77,7 @@
7577
- ericschn
7678
- faergeek
7779
- FilipJirsak
80+
- focusotter
7881
- frontsideair
7982
- fyzhu
8083
- fz6m
@@ -125,6 +128,8 @@
125128
- kachun333
126129
- Kakamotobi
127130
- kantuni
131+
- kapil-patel
132+
- kapilepatel
128133
- KaranRandhir
129134
- kark
130135
- KAROTT7
@@ -174,9 +179,11 @@
174179
- mikib0
175180
- minami-minami
176181
- minthulim
182+
- mlewando
177183
- modex98
178184
- morleytatro
179185
- ms10596
186+
- mtliendo
180187
- ned-park
181188
- nilubisan
182189
- Nismit
@@ -202,6 +209,7 @@
202209
- ryanflorence
203210
- ryanhiebert
204211
- sanketshah19
212+
- saul-atomrigs
205213
- sbolel
206214
- scarf005
207215
- senseibarni

docs/components/link.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function EditContact() {
9191
}
9292
```
9393

94-
Please note that `relative: "path"` only impacts the resolution of a relative path. It does not change the the "starting" location for that relative path resolution. This resolution is always relative to the current location in the Route hierarchy (i.e., the route `Link` is rendered in).
94+
Please note that `relative: "path"` only impacts the resolution of a relative path. It does not change the "starting" location for that relative path resolution. This resolution is always relative to the current location in the Route hierarchy (i.e., the route `Link` is rendered in).
9595

9696
If you wish to use path-relative routing against the current URL instead of the route hierarchy, you can do that with the current [`location`][use-location] and the `URL` constructor (note the trailing slash behavior):
9797

@@ -107,7 +107,7 @@ new URL("..", window.origin + location.pathname);
107107

108108
// With trailing slashes:
109109
new URL(".", window.origin + location.pathname + "/");
110-
// 'https://remix.run/docs/en/main/start/future-flags/'
110+
// 'https://remix.run/docs/en/main/start/quickstart/'
111111
new URL("..", window.origin + location.pathname + "/");
112112
// 'https://remix.run/docs/en/main/start/'
113113
```

docs/route/loader.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Note that the APIs here are not React Router specific, but rather standard web o
8787

8888
## `loader.hydrate`
8989

90-
If you are [Server-Side Rendering][ssr] and leveraging the `fututre.v7_partialHydration` flag for [Partial Hydration][partialhydration], then you may wish to opt-into running a route `loader` on initial hydration _even though it has hydration data_ (for example, to let a user prime a cache with the hydration data). To force a `loader` to run on hydration in a partial hydration scenario, you can set a `hydrate` property on the `loader` function:
90+
If you are [Server-Side Rendering][ssr] and leveraging the `future.v7_partialHydration` flag for [Partial Hydration][partialhydration], then you may wish to opt-into running a route `loader` on initial hydration _even though it has hydration data_ (for example, to let a user prime a cache with the hydration data). To force a `loader` to run on hydration in a partial hydration scenario, you can set a `hydrate` property on the `loader` function:
9191

9292
## Returning Responses
9393

docs/routers/create-browser-router.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,14 @@ const routes [
297297
];
298298

299299
let router = createBrowserRouter(routes, {
300-
unstable_dataStrategy({ request, params, matches }) {
300+
async unstable_dataStrategy({ request, params, matches }) {
301301
// Run middleware sequentially and let them add data to `context`
302302
let context = {};
303-
for (match of matches) {
303+
for (const match of matches) {
304304
if (match.route.handle?.middleware) {
305305
await match.route.handle.middleware({ request, params }, context);
306306
}
307-
});
307+
}
308308

309309
// Run loaders in parallel with the `context` value
310310
return Promise.all(

docs/start/tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -768,14 +768,14 @@ export default function EditContact() {
768768
aria-label="First name"
769769
type="text"
770770
name="first"
771-
defaultValue={contact.first}
771+
defaultValue={contact?.first}
772772
/>
773773
<input
774774
placeholder="Last"
775775
aria-label="Last name"
776776
type="text"
777777
name="last"
778-
defaultValue={contact.last}
778+
defaultValue={contact?.last}
779779
/>
780780
</p>
781781
<label>
@@ -784,7 +784,7 @@ export default function EditContact() {
784784
type="text"
785785
name="twitter"
786786
placeholder="@jack"
787-
defaultValue={contact.twitter}
787+
defaultValue={contact?.twitter}
788788
/>
789789
</label>
790790
<label>
@@ -794,14 +794,14 @@ export default function EditContact() {
794794
aria-label="Avatar URL"
795795
type="text"
796796
name="avatar"
797-
defaultValue={contact.avatar}
797+
defaultValue={contact?.avatar}
798798
/>
799799
</label>
800800
<label>
801801
<span>Notes</span>
802802
<textarea
803803
name="notes"
804-
defaultValue={contact.notes}
804+
defaultValue={contact?.notes}
805805
rows={6}
806806
/>
807807
</label>

docs/upgrading/v6-data.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ import {
9797

9898
// 3️⃣ Router singleton created
9999
const router = createBrowserRouter([
100-
{ path: "*", Component: Root },
100+
{ path: "*", element: <Root /> },
101101
]);
102102

103103
// 4️⃣ RouterProvider added
@@ -133,12 +133,12 @@ function UserApp() {
133133

134134
### Start lifting routes and leveraging the data APIs
135135

136-
Let's start with the `/` route for the `<Home>` component. All we need to do is lift the `<Route>` definition up to the data router:
136+
Let's start with the `/` route for the `<Home>` element. All we need to do is lift the `<Route>` definition up to the data router:
137137

138138
```tsx lines=[2,13]
139139
const router = createBrowserRouter([
140-
{ path: "/", Component: Home }, // 🆕
141-
{ path: "*", Component: Root },
140+
{ path: "/", element: <Home /> }, // 🆕
141+
{ path: "*", element: <Root /> },
142142
]);
143143

144144
export default function App() {
@@ -162,18 +162,18 @@ Now let's look at lifting the Blog App upwards, but still doing it one leaf rout
162162

163163
```tsx lines=[3-12,23,32]
164164
const router = createBrowserRouter([
165-
{ path: "/", Component: Home },
165+
{ path: "/", element: <Home /> },
166166
{
167167
// Lifted blog splat route
168168
path: "/blog/*",
169169
children: [
170170
// New blog index route
171-
{ index: true, Component: () => <h1>Blog Index</h1> },
171+
{ index: true, element: <h1>Blog Index</h1> },
172172
// Blog subapp splat route added for /blog/posts matching
173-
{ path: "*", Component: BlogApp },
173+
{ path: "*", element: <BlogApp /> },
174174
],
175175
},
176-
{ path: "*", Component: Root },
176+
{ path: "*", element: <Root /> },
177177
]);
178178

179179
export default function App() {

0 commit comments

Comments
 (0)