Skip to content

Commit

Permalink
Add basic data router example (#10285)
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Mar 29, 2023
1 parent a44859f commit 5a43e19
Show file tree
Hide file tree
Showing 13 changed files with 1,264 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ body:
### Test Case Starters:
* [Using `<RouterProvider>`](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/data-router?file=src/App.tsx)
* [Using `<RouterProvider>`](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/basic-data-router?file=src/app.tsx)
* [Using `<BrowserRouter>`](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/basic?file=src/App.tsx)
- type: input
attributes:
Expand Down
5 changes: 5 additions & 0 deletions examples/basic-data-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/basic-data-router/.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/basic-data-router/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Basic (Data Router)
toc: false
order: 1
---

# Data Routers

This example demonstrates a simple usage of a Data Router, using `createBrowserRouter` and `<RouterProvider>`.

## 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-data-router?file=src/App.tsx)
12 changes: 12 additions & 0 deletions examples/basic-data-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 Data Router Example</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 5a43e19

Please sign in to comment.