Skip to content

Commit

Permalink
Merge branch 'main' into release-next
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Mar 21, 2023
2 parents 35109d3 + 1634af2 commit 5bfffa8
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 22 deletions.
4 changes: 3 additions & 1 deletion contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
- kentcdodds
- kiliman
- kkirsche
- kno-raziel
- koojaa
- KostiantynPopovych
- KutnerUri
Expand Down Expand Up @@ -142,6 +143,7 @@
- ms10596
- ned-park
- nilubisan
- nnhjs
- noisypigeon
- Obi-Dann
- omar-moquete
Expand Down Expand Up @@ -195,9 +197,9 @@
- WalkAlone0325
- willemarcel
- williamsdyyz
- willsawyerrrr
- xavier-lc
- xcsnowcity
- yionr
- yuleicul
- zheng-chuang
- nnhjs
2 changes: 1 addition & 1 deletion docs/hooks/use-fetchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ For example, imagine a UI where the sidebar lists projects, and the main view di
+-----------------+----------------------------┘
```

When the user clicks a checkbox, the submission goes to the action to change the state of the task. Instead of creating a "loading state" we want to create an "optimistic UI" that will **immediately** update the checkbox to appear checked even though the server hasn't processed it yet. In the checkbox component, we can use `fetcher.submission`:
When the user clicks a checkbox, the submission goes to the action to change the state of the task. Instead of creating a "loading state" we want to create an "optimistic UI" that will **immediately** update the checkbox to appear checked even though the server hasn't processed it yet. In the checkbox component, we can use `fetcher.formData`:

```tsx
function Task({ task }) {
Expand Down
4 changes: 1 addition & 3 deletions docs/start/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -664,9 +664,7 @@ And the resulting element tree rendered will be:
</PageLayout>
```

<docs-warning>
Don't forget to add an `<Outlet>` to your layout where you would like child route elements to be rendered. Using `children` will not work as expected.
</docs-warning>
<docs-warning>Don't forget to add an `<Outlet>` to your layout where you would like child route elements to be rendered. Using `{children}` will not work as expected.</docs-warning>

The `PageLayout` route is admittedly weird. We call it a [layout route](#layout-route) because it doesn't participate in the matching at all (though its children do). It only exists to make wrapping multiple child routes in the same layout simpler. If we didn't allow this then you'd have to handle layouts in two different ways: sometimes your routes do it for you, sometimes you do it manually with lots of layout component repetition throughout your app:

Expand Down
2 changes: 1 addition & 1 deletion docs/start/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Another important reason for using the `element` prop in v6 is that `<Route chil

## How do I add a No Match (404) Route in react-router v6?

In v4 we would have just left the path prop off a route. In v5 we would have wrapped our 404 element in a Route and used `path="*"`. In v6 use the new element prop, pass `path="*"` instead:
In v4 we would have just left the path prop off a route. In v5 we would have wrapped our 404 element in a Route and used `path="*"`. In v6 use `path="*"` and pass the 404 element into the new `element` prop instead of wrapping it:

```js
<Route path="*" element={<NoMatch />} />
Expand Down
27 changes: 15 additions & 12 deletions examples/lazy-loading-router-provider/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/lazy-loading-router-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.8.0"
"react-router-dom": "^6.9.0"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-router/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@

### Patch Changes

- Fix `generatePath` incorrectly applying parameters in some cases ([`bc6fefa1`](https://github.com/remix-run/react-router/commit/bc6fefa19019ce9f5250c8b5af9b8c5d3390e9d1))
- Improve memoization for context providers to avoid unnecessary re-renders ([`bc6fefa1`](https://github.com/remix-run/react-router/commit/bc6fefa19019ce9f5250c8b5af9b8c5d3390e9d1))
- Fix `generatePath` incorrectly applying parameters in some cases ([#10078](https://github.com/remix-run/react-router/pull/10078))
- Improve memoization for context providers to avoid unnecessary re-renders ([#9983](https://github.com/remix-run/react-router/pull/9983))

## 6.8.2

Expand Down
2 changes: 1 addition & 1 deletion packages/router/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

### Patch Changes

- Fix `generatePath` incorrectly applying parameters in some cases ([`bc6fefa1`](https://github.com/remix-run/react-router/commit/bc6fefa19019ce9f5250c8b5af9b8c5d3390e9d1))
- Fix `generatePath` incorrectly applying parameters in some cases ([#10078](https://github.com/remix-run/react-router/pull/10078))

## 1.3.3

Expand Down

0 comments on commit 5bfffa8

Please sign in to comment.