Skip to content

Commit

Permalink
Merge branch 'release-next' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Feb 27, 2024
2 parents 6b22f91 + 5f0cf32 commit 95acd38
Show file tree
Hide file tree
Showing 20 changed files with 167 additions and 72 deletions.
6 changes: 0 additions & 6 deletions .changeset/fifty-pugs-boil.md

This file was deleted.

100 changes: 56 additions & 44 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,141 +13,143 @@ We manage release notes in this file instead of the paginated Github Releases Pa
<summary>Table of Contents</summary>

- [React Router Releases](#react-router-releases)
- [v6.22.1](#v6221)
- [Patch Changes](#patch-changes)
- [v6.22.0](#v6220)
- [What's Changed](#whats-changed)
- [Core Web Vitals Technology Report Flag](#core-web-vitals-technology-report-flag)
- [Minor Changes](#minor-changes)
- [Patch Changes](#patch-changes)
- [v6.21.3](#v6213)
- [Patch Changes](#patch-changes-1)
- [v6.21.2](#v6212)
- [v6.21.3](#v6213)
- [Patch Changes](#patch-changes-2)
- [v6.21.1](#v6211)
- [v6.21.2](#v6212)
- [Patch Changes](#patch-changes-3)
- [v6.21.1](#v6211)
- [Patch Changes](#patch-changes-4)
- [v6.21.0](#v6210)
- [What's Changed](#whats-changed-1)
- [`future.v7_relativeSplatPath`](#futurev7_relativesplatpath)
- [Partial Hydration](#partial-hydration)
- [Minor Changes](#minor-changes-1)
- [Patch Changes](#patch-changes-4)
- [v6.20.1](#v6201)
- [Patch Changes](#patch-changes-5)
- [v6.20.1](#v6201)
- [Patch Changes](#patch-changes-6)
- [v6.20.0](#v6200)
- [Minor Changes](#minor-changes-2)
- [Patch Changes](#patch-changes-6)
- [Patch Changes](#patch-changes-7)
- [v6.19.0](#v6190)
- [What's Changed](#whats-changed-2)
- [`unstable_flushSync` API](#unstable_flushsync-api)
- [Minor Changes](#minor-changes-3)
- [Patch Changes](#patch-changes-7)
- [Patch Changes](#patch-changes-8)
- [v6.18.0](#v6180)
- [What's Changed](#whats-changed-3)
- [New Fetcher APIs](#new-fetcher-apis)
- [Persistence Future Flag (`future.v7_fetcherPersist`)](#persistence-future-flag-futurev7_fetcherpersist)
- [Minor Changes](#minor-changes-4)
- [Patch Changes](#patch-changes-8)
- [Patch Changes](#patch-changes-9)
- [v6.17.0](#v6170)
- [What's Changed](#whats-changed-4)
- [View Transitions 🚀](#view-transitions-)
- [Minor Changes](#minor-changes-5)
- [Patch Changes](#patch-changes-9)
- [Patch Changes](#patch-changes-10)
- [v6.16.0](#v6160)
- [Minor Changes](#minor-changes-6)
- [Patch Changes](#patch-changes-10)
- [Patch Changes](#patch-changes-11)
- [v6.15.0](#v6150)
- [Minor Changes](#minor-changes-7)
- [Patch Changes](#patch-changes-11)
- [v6.14.2](#v6142)
- [Patch Changes](#patch-changes-12)
- [v6.14.1](#v6141)
- [v6.14.2](#v6142)
- [Patch Changes](#patch-changes-13)
- [v6.14.1](#v6141)
- [Patch Changes](#patch-changes-14)
- [v6.14.0](#v6140)
- [What's Changed](#whats-changed-5)
- [JSON/Text Submissions](#jsontext-submissions)
- [Minor Changes](#minor-changes-8)
- [Patch Changes](#patch-changes-14)
- [Patch Changes](#patch-changes-15)
- [v6.13.0](#v6130)
- [What's Changed](#whats-changed-6)
- [Minor Changes](#minor-changes-9)
- [Patch Changes](#patch-changes-15)
- [v6.12.1](#v6121)
- [Patch Changes](#patch-changes-16)
- [v6.12.1](#v6121)
- [Patch Changes](#patch-changes-17)
- [v6.12.0](#v6120)
- [What's Changed](#whats-changed-7)
- [`React.startTransition` support](#reactstarttransition-support)
- [Minor Changes](#minor-changes-10)
- [Patch Changes](#patch-changes-17)
- [v6.11.2](#v6112)
- [Patch Changes](#patch-changes-18)
- [v6.11.1](#v6111)
- [v6.11.2](#v6112)
- [Patch Changes](#patch-changes-19)
- [v6.11.1](#v6111)
- [Patch Changes](#patch-changes-20)
- [v6.11.0](#v6110)
- [Minor Changes](#minor-changes-11)
- [Patch Changes](#patch-changes-20)
- [Patch Changes](#patch-changes-21)
- [v6.10.0](#v6100)
- [What's Changed](#whats-changed-8)
- [Minor Changes](#minor-changes-12)
- [Patch Changes](#patch-changes-21)
- [Patch Changes](#patch-changes-22)
- [v6.9.0](#v690)
- [What's Changed](#whats-changed-9)
- [`Component`/`ErrorBoundary` route properties](#componenterrorboundary-route-properties)
- [Introducing Lazy Route Modules](#introducing-lazy-route-modules)
- [Minor Changes](#minor-changes-13)
- [Patch Changes](#patch-changes-22)
- [v6.8.2](#v682)
- [Patch Changes](#patch-changes-23)
- [v6.8.1](#v681)
- [v6.8.2](#v682)
- [Patch Changes](#patch-changes-24)
- [v6.8.1](#v681)
- [Patch Changes](#patch-changes-25)
- [v6.8.0](#v680)
- [Minor Changes](#minor-changes-14)
- [Patch Changes](#patch-changes-25)
- [Patch Changes](#patch-changes-26)
- [v6.7.0](#v670)
- [Minor Changes](#minor-changes-15)
- [Patch Changes](#patch-changes-26)
- [v6.6.2](#v662)
- [Patch Changes](#patch-changes-27)
- [v6.6.1](#v661)
- [v6.6.2](#v662)
- [Patch Changes](#patch-changes-28)
- [v6.6.1](#v661)
- [Patch Changes](#patch-changes-29)
- [v6.6.0](#v660)
- [What's Changed](#whats-changed-10)
- [Minor Changes](#minor-changes-16)
- [Patch Changes](#patch-changes-29)
- [Patch Changes](#patch-changes-30)
- [v6.5.0](#v650)
- [What's Changed](#whats-changed-11)
- [Minor Changes](#minor-changes-17)
- [Patch Changes](#patch-changes-30)
- [v6.4.5](#v645)
- [Patch Changes](#patch-changes-31)
- [v6.4.4](#v644)
- [v6.4.5](#v645)
- [Patch Changes](#patch-changes-32)
- [v6.4.3](#v643)
- [v6.4.4](#v644)
- [Patch Changes](#patch-changes-33)
- [v6.4.2](#v642)
- [v6.4.3](#v643)
- [Patch Changes](#patch-changes-34)
- [v6.4.1](#v641)
- [v6.4.2](#v642)
- [Patch Changes](#patch-changes-35)
- [v6.4.1](#v641)
- [Patch Changes](#patch-changes-36)
- [v6.4.0](#v640)
- [What's Changed](#whats-changed-12)
- [Remix Data APIs](#remix-data-apis)
- [Patch Changes](#patch-changes-36)
- [Patch Changes](#patch-changes-37)
- [v6.3.0](#v630)
- [Minor Changes](#minor-changes-18)
- [v6.2.2](#v622)
- [Patch Changes](#patch-changes-37)
- [v6.2.1](#v621)
- [Patch Changes](#patch-changes-38)
- [v6.2.1](#v621)
- [Patch Changes](#patch-changes-39)
- [v6.2.0](#v620)
- [Minor Changes](#minor-changes-19)
- [Patch Changes](#patch-changes-39)
- [v6.1.1](#v611)
- [Patch Changes](#patch-changes-40)
- [v6.1.1](#v611)
- [Patch Changes](#patch-changes-41)
- [v6.1.0](#v610)
- [Minor Changes](#minor-changes-20)
- [Patch Changes](#patch-changes-41)
- [v6.0.2](#v602)
- [Patch Changes](#patch-changes-42)
- [v6.0.1](#v601)
- [v6.0.2](#v602)
- [Patch Changes](#patch-changes-43)
- [v6.0.1](#v601)
- [Patch Changes](#patch-changes-44)
- [v6.0.0](#v600)

</details>
Expand All @@ -171,6 +173,16 @@ Date: YYYY-MM-DD
**Full Changelog**: [`v6.X.Y...v6.X.Y`](https://github.com/remix-run/react-router/compare/react-router@6.X.Y...react-router@6.X.Y)
-->

## v6.22.1

Date: 2024-02-16

### Patch Changes

- Fix encoding/decoding issues with pre-encoded dynamic parameter values ([#11199](https://github.com/remix-run/react-router/pull/11199))

**Full Changelog**: [`v6.22.0...v6.22.1`](https://github.com/remix-run/react-router/compare/react-router@6.22.0...react-router@6.22.1)

## v6.22.0

Date: 2024-02-01
Expand Down
3 changes: 3 additions & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- AchThomas
- adamdotjs
- adil62
- adriananin
- adrienharnay
- afzalsayed96
- Ajayff4
Expand Down Expand Up @@ -71,6 +72,7 @@
- emzoumpo
- engpetermwangi
- ericschn
- faergeek
- FilipJirsak
- frontsideair
- fyzhu
Expand Down Expand Up @@ -108,6 +110,7 @@
- janpaepke
- jasikpark
- jasonpaulos
- jb-1980
- jdufresne
- jenseng
- JeraldVin
Expand Down
22 changes: 22 additions & 0 deletions docs/components/link.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,27 @@ function EditContact() {
}
```

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).

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):

```js
// Assume the current URL is https://remix.run/docs/en/main/start/quickstart
let location = useLocation();

// Without trailing slashes
new URL(".", window.origin + location.pathname);
// 'https://remix.run/docs/en/main/start/'
new URL("..", window.origin + location.pathname);
// 'https://remix.run/docs/en/main/'

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

## `preventScrollReset`

If you are using [`<ScrollRestoration>`][scrollrestoration], this lets you prevent the scroll position from being reset to the top of the window when the link is clicked.
Expand Down Expand Up @@ -205,3 +226,4 @@ function ImageLink(to) {
[picking-a-router]: ../routers/picking-a-router
[navlink]: ./nav-link
[relativesplatpath]: ../hooks/use-resolved-path#splat-paths
[use-location]: ../hooks/use-location
10 changes: 5 additions & 5 deletions docs/guides/ssr.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const app = express();
let handler = createStaticHandler(routes);

app.get("*", async (req, res) => {
let fetchRequest = createFetchRequest(req);
let fetchRequest = createFetchRequest(req, res);
let context = await handler.query(fetchRequest);

// We'll tackle rendering next...
Expand All @@ -81,13 +81,13 @@ const listener = app.listen(3000, () => {
Note we have to first convert the incoming Express request into a Fetch request, which is what the static handler methods operate on. The `createFetchRequest` method is specific to an Express request and in this example is extracted from the `@remix-run/express` adapter:

```js filename=request.js
module.exports = function createFetchRequest(req) {
module.exports = function createFetchRequest(req, res) {
let origin = `${req.protocol}://${req.get("host")}`;
// Note: This had to take originalUrl into account for presumably vite's proxying
let url = new URL(req.originalUrl || req.url, origin);

let controller = new AbortController();
req.on("close", () => controller.abort());
res.on("close", () => controller.abort());

let headers = new Headers();

Expand Down Expand Up @@ -121,7 +121,7 @@ Once we've loaded our data by executing all of the matched route loaders for the

```js filename=server.jsx lines=[5-16]
app.get("*", async (req, res) => {
let fetchRequest = createFetchRequest(req);
let fetchRequest = createFetchRequest(req, res);
let context = await handler.query(fetchRequest);

let router = createStaticRouter(
Expand Down Expand Up @@ -181,7 +181,7 @@ If any loaders redirect, `handler.query` will return the `Response` directly so

```js filename=server.jsx lines=[5-10]
app.get("*", async (req, res) => {
let fetchRequest = createFetchRequest(req);
let fetchRequest = createFetchRequest(req, res);
let context = await handler.query(fetchRequest);

if (
Expand Down
21 changes: 21 additions & 0 deletions docs/hooks/use-navigate.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,27 @@ function EditContact() {
}
```

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 `useNavigate` is called in).

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):

```js
// Assume the current URL is https://remix.run/docs/en/main/start/quickstart
let location = useLocation();

// Without trailing slashes
new URL(".", window.origin + location.pathname);
// 'https://remix.run/docs/en/main/start/'
new URL("..", window.origin + location.pathname);
// 'https://remix.run/docs/en/main/'

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

## `options.unstable_flushSync`

The `unstable_flushSync` option tells React Router DOM to wrap the initial state update for this navigation in a [`ReactDOM.flushSync`][flush-sync] call instead of the default [`React.startTransition`][start-transition]. This allows you to perform synchronous DOM actions immediately after the update is flushed to the DOM.
Expand Down
2 changes: 1 addition & 1 deletion docs/route/loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ createBrowserRouter([
]);
```

Note that the `:teamId` in the path is parsed as provided as `params.teamId` by the same name.
Note that the `:teamId` in the path is parsed and provided as `params.teamId` by the same name.

## `request`

Expand Down
2 changes: 1 addition & 1 deletion docs/start/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ function User() {
}
```

Instead of rending your component, remix will render the nearest [catch boundary][remix-catchboundary] instead.
Instead of rendering your component, remix will render the nearest [catch boundary][remix-catchboundary] instead.

[remix]: https://remix.run
[remix-catchboundary]: https://remix.run/docs/en/v1/api/conventions#catchboundary
Expand Down
2 changes: 1 addition & 1 deletion examples/ssr-data-router/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function createServer() {
}

try {
let appHtml = await render(req);
let appHtml = await render(req, res);
let html = template.replace("<!--app-html-->", appHtml);
res.setHeader("Content-Type", "text/html");
return res.status(200).end(html);
Expand Down
Loading

0 comments on commit 95acd38

Please sign in to comment.