Skip to content

Commit 565e2d2

Browse files
committed
move react docs
1 parent 4732229 commit 565e2d2

Some content is hidden

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

53 files changed

+73
-5698
lines changed

app/routes/MdxRoute.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,12 @@ let reactTableOfContents = () => {
107107
->groupBySection
108108
->Dict.mapValues(values => values->sortSection->convertToNavItems)
109109

110-
// Console.log(groups)
110+
Console.log(groups)
111111

112112
// these are the categories that appear in the sidebar
113113
let categories: array<SidebarLayout.Sidebar.Category.t> = [
114114
{name: "Overview", items: groups->Dict.getUnsafe("Overview")},
115+
// {name: "Main concepts", items: groups->Dict.getUnsafe("Main concepts")},
115116
]
116117

117118
Console.log(categories)
@@ -164,7 +165,6 @@ let loader: Loader.t<loaderData> = async ({request}) => {
164165
} else if pathname->String.includes("docs/react") {
165166
reactTableOfContents()
166167
} else {
167-
// TODO RR7 add react docs
168168
[]
169169
}
170170
}

docs/react/arrays-and-keys.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Arrays and Keys
33
description: "Rendering arrays and handling keys in ReScript and React"
44
canonical: "/docs/react/latest/arrays-and-keys"
5+
section: "Main Concepts"
6+
order: 4
57
---
68

79
# Arrays and Keys

docs/react/beyond-jsx.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Beyond JSX
33
description: "Details on how to use ReScript and React without JSX"
44
canonical: "/docs/react/latest/beyond-jsx"
5+
section: "Guides"
6+
order: 1
57
---
68

79
# Beyond JSX

docs/react/components-and-props.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Components and Props
33
description: "Basic concepts for components and props in ReScript & React"
44
canonical: "/docs/react/latest/components-and-props"
5+
section: "Main Concepts"
6+
order: 3
57
---
68

79
# Components and Props

docs/react/context.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Context
33
description: "Details about Context in ReScript and React"
44
canonical: "/docs/react/latest/context"
5+
section: "Main Concepts"
6+
order: 7
57
---
68

79
# Context

docs/react/elements-and-jsx.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Elements & JSX
33
description: "Basic concepts for React elements and how to use them in JSX"
44
canonical: "/docs/react/latest/elements-and-jsx"
5+
section: "Main Concepts"
6+
order: 1
57
---
68

79
# Elements & JSX

docs/react/events.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Events
33
description: "Event handlers for React elements"
44
canonical: "/docs/react/latest/events"
5+
section: "Main Concepts"
6+
order: 5
57
---
68

79
# Events

docs/react/extensions-of-props.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Extensions of props
33
description: "Extensions of props in ReScript and React"
44
canonical: "/docs/react/latest/spread-props"
5+
section: "Guides"
6+
order: 3
57
---
68

79
# Extensions of Props

docs/react/forwarding-refs.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Forwarding Refs
33
description: "Forwarding Ref values in ReScript and React"
44
canonical: "/docs/react/latest/forwarding-refs"
5+
section: "Guides"
6+
order: 2
57
---
68

79
# Forwarding Refs

docs/react/hooks-context.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: useContext Hook
33
description: "Details about the useContext React hook in ReScript"
44
canonical: "/docs/react/latest/hooks-context"
5+
section: "Hooks & State Management"
6+
order: 5
57
---
68

79
# useContext

0 commit comments

Comments
 (0)