Skip to content

Commit 30caa39

Browse files
authored
chore: add frontmatter to examples for website (#8218)
1 parent e905917 commit 30caa39

File tree

23 files changed

+56
-189
lines changed

23 files changed

+56
-189
lines changed

docs/examples/auth.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/examples/basic.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/examples/custom-filter-link.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/examples/custom-link.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/examples/custom-query-parsing.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/examples/index.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/examples/lazy-loading.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/examples/modal.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/examples/multi-app.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/examples/route-objects.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/examples/search-params.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/examples/ssr.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

examples/auth/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Authentication
3+
toc: false
4+
---
5+
16
# Auth Example
27

38
This example demonstrates how to restrict access to routes to authenticated users.

examples/basic/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
title: Basics
3+
toc: false
4+
order: 1
5+
---
6+
17
# Basic Example
28

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

examples/custom-filter-link/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Custom Filter Link
3+
toc: false
4+
---
5+
16
# Custom Filter Link Example
27

38
This example demonstrates how to use a query string parameter to mark a link as "active" or not. This is a common technique when implementing a filter in a sidebar where you're browsing products.

examples/custom-link/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Custom Active Link
3+
toc: false
4+
---
5+
16
# Custom Link Example
27

38
This example demonstrates how to make a custom `<Link>` component to render something different when the link is "active" using the `useMatch()` and `useResolvedPath()` hooks.

examples/custom-query-parsing/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Custom Query Parsing
3+
toc: false
4+
---
5+
16
# Custom Query Parsing Example
27

38
This example demonstrates how to store a complex data structure in the URL query string using a custom hook.

examples/lazy-loading/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Lazy Loading
3+
toc: false
4+
---
5+
16
# Lazy Loading Example
27

38
This example demonstrates how to lazily load both

examples/modal/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Modal
3+
toc: false
4+
---
5+
16
# Modal Example
27

38
## Preview

examples/multi-app/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Multi App
3+
toc: false
4+
---
5+
16
# Multi App Example
27

38
This example demonstrates how to build a site with multiple React Router apps by mounting each at a URL pathname prefix using the `<Router basename>` prop. This essentially decouples the apps from each other and allows them to be portable and even deployed separately.

examples/route-objects/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Route Objects
3+
toc: false
4+
---
5+
16
# Route Objects Example
27

38
This example demonstrates how to use the `useRoutes()` hook to define and render routes using regular JavaScript objects instead of `<Routes>` and `<Route>` elements. This is mainly a stylistic preference that may make more sense in some scenarios, depending on the data structures you're working with to define your routes.

examples/search-params/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Search Params
3+
toc: false
4+
---
5+
16
# Search Params Example
27

38
This example demonstrates how to read and write the URL query string using the `useSearchParams()` hook. This hook is similar to the `useNavigate()` hook, but just for the [`search` portion of the URL](https://developer.mozilla.org/en-US/docs/Web/API/Location/search).

examples/ssr/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Server Rendering
3+
toc: false
4+
---
5+
16
# Server-side Rendering Example
27

38
This example adds [server-side rendering](https://reactjs.org/docs/react-dom-server.html) (SSR) to our basic example.

0 commit comments

Comments
 (0)