Skip to content

Commit

Permalink
Merge branch 'release-next'
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Jan 18, 2023
2 parents d6aceaf + 74979cb commit 0e4c524
Show file tree
Hide file tree
Showing 51 changed files with 5,967 additions and 426 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ node_modules/
/packages/react-router-dom-v5-compat/react-router-dom

.eslintcache
/.env
/.env
/NOTES.md
2 changes: 2 additions & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
- janpaepke
- jasonpaulos
- jdufresne
- jenseng
- JesusTheHun
- jimniels
- jmargeta
Expand All @@ -98,6 +99,7 @@
- latin-1
- lequangdongg
- liuhanqu
- lkwr
- lopezac
- lordofthecactus
- loun4
Expand Down
5 changes: 5 additions & 0 deletions examples/navigation-blocking/.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/navigation-blocking/.stackblitzrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"installDependencies": true,
"startCommand": "npm run dev"
}
15 changes: 15 additions & 0 deletions examples/navigation-blocking/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Navigation Blocking
toc: false
order: 1
---

# Navigation Blocking

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.

## 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/navigation-blocking?file=src/App.tsx)
12 changes: 12 additions & 0 deletions examples/navigation-blocking/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 - Navigation Blocking</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 0e4c524

Please sign in to comment.