Skip to content

Commit 0e4c524

Browse files
committed
Merge branch 'release-next'
2 parents d6aceaf + 74979cb commit 0e4c524

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+5967
-426
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ node_modules/
2222
/packages/react-router-dom-v5-compat/react-router-dom
2323

2424
.eslintcache
25-
/.env
25+
/.env
26+
/NOTES.md

contributors.yml

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
- janpaepke
8080
- jasonpaulos
8181
- jdufresne
82+
- jenseng
8283
- JesusTheHun
8384
- jimniels
8485
- jmargeta
@@ -98,6 +99,7 @@
9899
- latin-1
99100
- lequangdongg
100101
- liuhanqu
102+
- lkwr
101103
- lopezac
102104
- lordofthecactus
103105
- loun4
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"installDependencies": true,
3+
"startCommand": "npm run dev"
4+
}
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: Navigation Blocking
3+
toc: false
4+
order: 1
5+
---
6+
7+
# Navigation Blocking
8+
9+
This example demonstrates using `unstable_useBlocker` to prevent navigating away from a page where you might lose user-entered form data. A potentially better UX for this is storing user-entered information in `sessionStorage` and pre-populating the form on return.
10+
11+
## Preview
12+
13+
Open this example on [StackBlitz](https://stackblitz.com):
14+
15+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/navigation-blocking?file=src/App.tsx)
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>React Router - Navigation Blocking</title>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script type="module" src="/src/main.tsx"></script>
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)