diff --git a/beta/CONTRIBUTING.md b/beta/CONTRIBUTING.md
index f893cab1..dd81c854 100644
--- a/beta/CONTRIBUTING.md
+++ b/beta/CONTRIBUTING.md
@@ -20,7 +20,7 @@ The documentation is divided into sections to cater to different learning styles
**[Learn React](https://beta.reactjs.org/learn)** is designed to introduce fundamental concepts in a step-by-step way. Each individual article in Learn React builds on the knowledge from the previous ones, so make sure not to add any "cyclical dependencies" between them. It is important that the reader can start with the first article and work their way to the last Learn React article without ever having to "look ahead" for a definition. This explains some ordering choices (e.g. that state is explained before events, or that "thinking in React" doesn't use refs). Learn React also serves as a reference manual for React concepts, so it is important to be very strict about their definitions and relationships between them.
-**[API Reference](https://reactjs.org/apis)** is organized by APIs rather than concepts. It is intended to be exhaustive. Any corner cases or recommendations that were skipped for brevity in Learn React should be mentioned in the reference documentation for the corresponding APIs.
+**[API Reference](https://reactjs.org/apis/react)** is organized by APIs rather than concepts. It is intended to be exhaustive. Any corner cases or recommendations that were skipped for brevity in Learn React should be mentioned in the reference documentation for the corresponding APIs.
**Try to follow your own instructions.**
diff --git a/beta/src/components/Layout/Footer.tsx b/beta/src/components/Layout/Footer.tsx
index 5133dc79..20b555bf 100644
--- a/beta/src/components/Layout/Footer.tsx
+++ b/beta/src/components/Layout/Footer.tsx
@@ -89,11 +89,11 @@ export function Footer() {
-
+
API Reference
- React APIs
- React DOM APIs
+ React APIs
+ React DOM APIs
diff --git a/beta/src/components/Layout/Nav/Nav.tsx b/beta/src/components/Layout/Nav/Nav.tsx
index a5099cc1..bc370485 100644
--- a/beta/src/components/Layout/Nav/Nav.tsx
+++ b/beta/src/components/Layout/Nav/Nav.tsx
@@ -182,7 +182,7 @@ export default function Nav() {
Learn
-
+
API
diff --git a/beta/src/components/Layout/Sidebar/SidebarLink.tsx b/beta/src/components/Layout/Sidebar/SidebarLink.tsx
index 987a9428..b3744591 100644
--- a/beta/src/components/Layout/Sidebar/SidebarLink.tsx
+++ b/beta/src/components/Layout/Sidebar/SidebarLink.tsx
@@ -16,6 +16,7 @@ interface SidebarLinkProps {
selected?: boolean;
title: string;
level: number;
+ wip: boolean | undefined;
icon?: React.ReactNode;
heading?: boolean;
isExpanded?: boolean;
@@ -28,6 +29,7 @@ export function SidebarLink({
href,
selected = false,
title,
+ wip,
level,
heading = false,
isExpanded,
@@ -74,7 +76,12 @@ export function SidebarLink({
}
)}>
{/* This here needs to be refactored ofc */}
- {title}
+
+ {title}
+
{isExpanded != null && !heading && !hideArrow && (
- {currentRoutes.map(({path, title, routes, heading}) => {
+ {currentRoutes.map(({path, title, routes, wip, heading}) => {
const pagePath = path && removeFromLast(path, '.');
const selected = slug === pagePath;
@@ -127,6 +127,7 @@ export function SidebarRouteTree({
selected={selected}
level={level}
title={title}
+ wip={wip}
isExpanded={isExpanded}
isBreadcrumb={expandedPath === path}
hideArrow={isMobile}
@@ -151,6 +152,7 @@ export function SidebarRouteTree({
selected={selected}
level={level}
title={title}
+ wip={wip}
/>
);
diff --git a/beta/src/components/Layout/useRouteMeta.tsx b/beta/src/components/Layout/useRouteMeta.tsx
index 5f962f7e..37b6a477 100644
--- a/beta/src/components/Layout/useRouteMeta.tsx
+++ b/beta/src/components/Layout/useRouteMeta.tsx
@@ -30,6 +30,8 @@ export interface RouteItem {
path?: string;
/** Whether the entry is a heading */
heading?: boolean;
+ /** Whether the page is under construction */
+ wip?: boolean;
/** List of sub-routes */
routes?: RouteItem[];
}
diff --git a/beta/src/components/MDX/ExpandableCallout.tsx b/beta/src/components/MDX/ExpandableCallout.tsx
index c4fc53c6..835cf9a2 100644
--- a/beta/src/components/MDX/ExpandableCallout.tsx
+++ b/beta/src/components/MDX/ExpandableCallout.tsx
@@ -7,7 +7,7 @@ import cn from 'classnames';
import {IconNote} from '../Icon/IconNote';
import {IconGotcha} from '../Icon/IconGotcha';
-type CalloutVariants = 'gotcha' | 'note';
+type CalloutVariants = 'gotcha' | 'note' | 'wip';
interface ExpandableCalloutProps {
children: React.ReactNode;
@@ -32,6 +32,14 @@ const variantMap = {
overlayGradient:
'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
},
+ wip: {
+ title: 'Under Construction',
+ Icon: IconNote,
+ containerClasses: 'bg-yellow-5 dark:bg-yellow-60 dark:bg-opacity-20',
+ textColor: 'text-yellow-50 dark:text-yellow-40',
+ overlayGradient:
+ 'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
+ },
};
function ExpandableCallout({children, type}: ExpandableCalloutProps) {
diff --git a/beta/src/components/MDX/HomepageHero.tsx b/beta/src/components/MDX/HomepageHero.tsx
index 17953852..9b86da8e 100644
--- a/beta/src/components/MDX/HomepageHero.tsx
+++ b/beta/src/components/MDX/HomepageHero.tsx
@@ -30,7 +30,7 @@ function HomepageHero() {
-
+
Look up the API signatures of React Hooks, and see their shape
using the visual code diagrams.
diff --git a/beta/src/components/MDX/MDXComponents.tsx b/beta/src/components/MDX/MDXComponents.tsx
index 7b4f9d49..59df9415 100644
--- a/beta/src/components/MDX/MDXComponents.tsx
+++ b/beta/src/components/MDX/MDXComponents.tsx
@@ -67,7 +67,9 @@ const UL = (p: JSX.IntrinsicElements['ul']) => (
const Divider = () => (
);
-
+const Wip = ({children}: {children: React.ReactNode}) => (
+ {children}
+);
const Gotcha = ({children}: {children: React.ReactNode}) => (
{children}
);
@@ -296,6 +298,7 @@ export const MDXComponents = {
Diagram,
DiagramGroup,
Gotcha,
+ Wip,
HomepageHero,
Illustration,
IllustrationBlock,
diff --git a/beta/src/pages/apis/index.md b/beta/src/pages/apis/index.md
deleted file mode 100644
index 254ee491..00000000
--- a/beta/src/pages/apis/index.md
+++ /dev/null
@@ -1,102 +0,0 @@
----
-title: React APIs
----
-
-
-
-The React package contains all the APIs necessary to define and use [components](/learn/your-first-component).
-
-
-
-## Installation {/*installation*/}
-
-It is available as [`react`](https://www.npmjs.com/package/react) on npm. You can also [add React to the page as a `