Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d67a490
save progress on createHooks method
auastorg Jul 27, 2022
7f6c548
add a few more tests and clean up implementation
auastorg Jul 27, 2022
eecb3fe
re-export from both packages
auastorg Jul 27, 2022
22decb1
got basic app working
auastorg Jul 27, 2022
f892be8
add react-router and react-router-dom support
auastorg Jul 29, 2022
ed5e007
add native pieces and create a new example
auastorg Jul 29, 2022
d8e3e34
create a scoped memory router example
auastorg Jul 29, 2022
6485a60
add github username to contributors.yml
auastorg Jul 29, 2022
55cb5a1
ci: update comment flow (#9405)
mcansh Oct 21, 2022
e2071ec
Fixed typo in the route/loader.md doc (#9492)
mrmarufpro Oct 24, 2022
4e0ce87
chore: sort contributors list
remix-cla-bot[bot] Oct 24, 2022
1eed012
Update tutorial.md (Added the missing preposition "to") (#9494)
vishwast03 Oct 24, 2022
d621451
chore: sort contributors list
remix-cla-bot[bot] Oct 24, 2022
8f63fe6
Fix the tutorial link (#9500)
dmitrytarassov Oct 25, 2022
11afb58
chore: sort contributors list
remix-cla-bot[bot] Oct 25, 2022
3aa4185
catch up to the latest dev branch
auastorg Oct 27, 2022
1a88f3b
catch up to the latest dev branch and resolve all conflicts
auastorg Oct 27, 2022
8de4a3f
Fix docs/hooks/use-outlet-context.md green lines (#9478)
lopezac Oct 29, 2022
0bc41fe
chore: sort contributors list
remix-cla-bot[bot] Oct 29, 2022
7cb44ea
Update contributors.yml (#9525)
omar-moquete Oct 30, 2022
c75df87
Merge branch 'release-6.4.3'
brophdawg11 Nov 1, 2022
8e09bd6
chore: sort contributors list
remix-cla-bot[bot] Nov 1, 2022
7796d89
Update DEVELPOMENT.md with post-release procedures
brophdawg11 Nov 1, 2022
2c562a4
Shorten this code block
timdorr Nov 4, 2022
bf5afbe
Fix broken links in the deferred data guide (#9557)
bvangraafeiland Nov 4, 2022
941b005
docs(components/form): fix typo (#9399)
ivanjeremic Nov 8, 2022
6cce1a3
chore: sort contributors list
remix-cla-bot[bot] Nov 8, 2022
5bfd258
chore: format
remix-run-bot Nov 8, 2022
6beb449
docs(components/await): fix typo (#9440)
lequangdongg Nov 9, 2022
8f4043b
chore: sort contributors list
remix-cla-bot[bot] Nov 9, 2022
7561a0f
fix merge conflicts
auastorg Nov 14, 2022
db89bc7
Merge branch 'dev' into user/auastorg-ms/scoped-memory-router
auaustorg-ms Nov 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/postrelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 🕊 Post-release

on:
push:
tags:
# only run on `react-router` tags
- "react-router@*"

jobs:
comment:
name: 📝 Comment on related issues and pull requests
if: github.repository == 'remix-run/react-router'
uses: ./.github/workflows/release-comments.yml
with:
ref: ${{ github.ref }}
# this should match the above tag to watch excluding the trailing "@"
packageVersionToFollow: "react-router"
17 changes: 12 additions & 5 deletions .github/workflows/release-comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
ref:
required: true
type: string
packageVersionToFollow:
required: true
type: string

jobs:
comment:
Expand All @@ -20,16 +23,20 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "yarn"
cache: "npm"
cache-dependency-path: scripts/release/package-lock.json

- name: 📥 Install deps
# even though this is called "npm-install" it does use yarn to install
# because we have a yarn.lock and caches efficiently.
uses: bahmutov/npm-install@v1
run: npm ci
working-directory: ./scripts/release

- name: 📝 Comment on issues
run: node ./scripts/release/comment.mjs
working-directory: ./scripts/release
run: node -r esbuild-register ./comment.ts
env:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ github.token }}
VERSION: ${{ inputs.ref }}
DEFAULT_BRANCH: "main"
NIGHTLY_BRANCH: "dev"
PACKAGE_VERSION_TO_FOLLOW: ${{ inputs.packageVersionToFollow }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
publish: yarn release
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN_SO_OTHER_ACTIONS_RUN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# comment:
Expand Down
5 changes: 5 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ You may need to make changes to a pre-release prior to publishing a final stable
- Commit the unpublished changesets and push the the `release-*` branch to GitHub; wait for the release workflow to finish and the Changesets action to open its PR that will increment all versions to stable
- Review the updated `CHANGELOG` files and make any adjustments necessary, then merge the PR
- Once the PR is merged, the release workflow will publish the updated packages to npm
- Once the release is published:
- merge the `release-*` branch into `main` and push it up to github
- merge the `release-*` branch into `dev` and push it up to github
- Convert the `[email protected]` tag to a Release on Github with the name `v6.x.y`
- Copy the relevant changelog entries from all packages into the Release Notes and adjust accordingly, matching the format used by prior releases

### Experimental releases

Expand Down
11 changes: 10 additions & 1 deletion contributors.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
- abdallah-nour
- abhi-kr-2100
- adamdotjs
- AchThomas
- adamdotjs
- Ajayff4
- alany411
- alexlbr
- auaustorg-ms
- AmRo045
- andreiduca
- arnassavickas
Expand All @@ -18,6 +19,7 @@
- brockross
- brophdawg11
- btav
- bvangraafeiland
- CanRau
- chaance
- chasinhues
Expand All @@ -31,6 +33,7 @@
- danielberndt
- dauletbaev
- david-crespo
- dmitrytarassov
- dokeet
- Drishtantr
- edwin177
Expand All @@ -57,6 +60,7 @@
- infoxicator
- IsaiStormBlesed
- Isammoc
- ivanjeremic
- jacob-ebey
- JaffParker
- JakubDrozd
Expand All @@ -74,14 +78,17 @@
- KostiantynPopovych
- KutnerUri
- latin-1
- lequangdongg
- liuhanqu
- lopezac
- loun4
- lqze
- lukerSpringTree
- Manc
- manzano78
- marc2332
- markivancho
- maruffahmed
- marvinruder
- maxpou
- mcansh
Expand All @@ -93,6 +100,7 @@
- morleytatro
- ms10596
- noisypigeon
- omar-moquete
- p13i
- parched
- paulsmithkc
Expand Down Expand Up @@ -128,6 +136,7 @@
- underager
- vijaypushkin
- vikingviolinist
- vishwast03
- willemarcel
- williamsdyyz
- xavier-lc
Expand Down
2 changes: 1 addition & 1 deletion docs/components/await.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ import {
defer,
Route,
useLoaderData,
Async,
Await,
} from "react-router-dom";

// given this route
Expand Down
6 changes: 3 additions & 3 deletions docs/components/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ The method will be available on [`request.method`][requestmethod] inside the rou
path="/projects/:id"
element={<Project />}
loader={async ({ params }) => {
return fakeLoadProject(params.id)
return fakeLoadProject(params.id);
}}
action={async ({ request, params }) => {
switch (request.method) {
Expand All @@ -140,8 +140,8 @@ The method will be available on [`request.method`][requestmethod] inside the rou
case "delete": {
return fakeDeleteProject(params.id);
}
default {
throw new Response("", { status: 405 })
default: {
throw new Response("", { status: 405 });
}
}
}}
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/deferred.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,6 @@ So just keep this in mind: **Deferred is 100% only about the initial load of a r

[link]: ../components/link
[usefetcher]: ../hooks/use-fetcher
[defer response]: ../fetch/defer
[defer response]: ../utils/defer
[await]: ../components/await
[useasyncvalue]: ../hooks/use-async-data
[useasyncvalue]: ../hooks/use-async-value
4 changes: 2 additions & 2 deletions docs/hooks/use-outlet-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Parent() {
}
```

```tsx lines=[2]
```tsx lines=[4]
import { useOutletContext } from "react-router-dom";

function Child() {
Expand All @@ -36,7 +36,7 @@ function Child() {

If you're using TypeScript, we recommend the parent component provide a custom hook for accessing the context value. This makes it easier for consumers to get nice typings, control consumers, and know who's consuming the context value. Here's a more realistic example:

```tsx filename=src/routes/dashboard.tsx lines=[12,17-19]
```tsx filename=src/routes/dashboard.tsx lines=[13, 19]
import * as React from "react";
import type { User } from "./types";
import { Outlet, useOutletContext } from "react-router-dom";
Expand Down
2 changes: 1 addition & 1 deletion docs/hooks/use-route-error.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ new: true

# `useRouteError`

Inside of an [`errorElement`][errorelement], this hooks returns anything thrown during an action, loader, or rendering. Note that thrown responses have special treatment, see [`isRouteErrorResponse`][isrouteerrorresponse] for more information.
Inside of an [`errorElement`][errorelement], this hook returns anything thrown during an action, loader, or rendering. Note that thrown responses have special treatment, see [`isRouteErrorResponse`][isrouteerrorresponse] for more information.

<docs-warning>This feature only works if using a data router, see [Picking a Router][pickingarouter]</docs-warning>

Expand Down
2 changes: 1 addition & 1 deletion docs/route/loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Note that the APIs here are not React Router specific, but rather standard web o

While you can return anything you want from a loader and get access to it from [`useLoaderData`][useloaderdata], you can also return a web [Response][response].

This might not seem immediately useful, but consider `fetch`. Since the return value of of `fetch` is a Response, and loaders understand responses, many loaders can return a simple fetch!
This might not seem immediately useful, but consider `fetch`. Since the return value of `fetch` is a Response, and loaders understand responses, many loaders can return a simple fetch!

```tsx
// an HTTP/REST API
Expand Down
2 changes: 1 addition & 1 deletion docs/start/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1830,7 +1830,7 @@ If you click the button now you should see the star _immediately_ change to the

## Not Found Data

What happens if the contact we're trying load doesn't exist?
What happens if the contact we're trying to load doesn't exist?

<img loading="lazy" class="tutorial" src="/_docs/tutorial/25.webp" />

Expand Down
4 changes: 2 additions & 2 deletions docs/upgrading/v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,8 @@ import { matchPath } from "react-router-dom";
const match = matchPath(
{
path: "/users/:id",
caseSensitive: false, // Optional. Should be `true` if the static portions of the `path` should be matched in the same case.
end: true, // Optional. Should be `true` if this pattern should match the entire URL pathname
caseSensitive: false, // Optional, `true` == static parts of `path` should match case
end: true, // Optional, `true` == pattern should match the entire URL pathname
},
"/users/123"
);
Expand Down
5 changes: 5 additions & 0 deletions examples/scoped-memory-router/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
4 changes: 4 additions & 0 deletions examples/scoped-memory-router/.stackblitzrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"installDependencies": true,
"startCommand": "npm run dev"
}
21 changes: 21 additions & 0 deletions examples/scoped-memory-router/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Basics
toc: false
order: 1
---

# Basic Example

This example demonstrates some of the basic features of React Router, including:

- Layouts and nested `<Route>`s
- Index `<Route>`s
- Catch-all `<Route>`s
- Using `<Outlet>` as a placeholder for child routes
- Using `<Link>`s for navigation

## Preview

Open this example on [StackBlitz](https://stackblitz.com):

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/basic?file=src/App.tsx)
12 changes: 12 additions & 0 deletions examples/scoped-memory-router/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>React Router - Basic Example</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading