Skip to content

Commit 5b8bc87

Browse files
committed
experimental -> Canary
1 parent c8e688e commit 5b8bc87

File tree

5 files changed

+23
-44
lines changed

5 files changed

+23
-44
lines changed

src/components/MDX/MDXComponents.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,6 @@ const CanaryBadge = ({title}: {title: string}) => (
120120
</span>
121121
);
122122

123-
const ExperimentalBadge = ({title}: {title: string}) => (
124-
<span
125-
title={title}
126-
className={
127-
'text-base font-display px-1 py-0.5 font-bold bg-gray-10 dark:bg-gray-60 text-gray-60 dark:text-gray-10 rounded'
128-
}>
129-
<IconCanary
130-
size="s"
131-
className={'inline me-1 mb-0.5 text-sm text-gray-60 dark:text-gray-10'}
132-
/>
133-
Experimental only
134-
</span>
135-
);
136-
137123
const NextMajorBadge = ({title}: {title: string}) => (
138124
<span
139125
title={title}
@@ -523,7 +509,6 @@ export const MDXComponents = {
523509
Note,
524510
Canary,
525511
CanaryBadge,
526-
ExperimentalBadge,
527512
NextMajor,
528513
NextMajorBadge,
529514
RSC,

src/content/reference/react-dom/client/createRoot.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ It is uncommon to call `render` multiple times. Usually, your components will [u
349349
By default, React will log all uncaught errors to the console. To implement your own error reporting, you can provide the optional `onUncaughtError` root option:
350350
351351
```js [[1, 8, "onUncaughtError"], [2, 8, "error", 1], [3, 8, "errorInfo"], [4, 12, "componentStack"], [5, 13, "captureOwnerStack()"]]
352-
// captureOwnerStack is only available in react@experimental.
352+
// captureOwnerStack is only available in react@canary.
353353
import { captureOwnerStack } from 'react';
354354
import { createRoot } from 'react-dom/client';
355355

@@ -374,7 +374,7 @@ The <CodeStep step={1}>onUncaughtError</CodeStep> option is a function called wi
374374
1. The <CodeStep step={2}>error</CodeStep> that was thrown.
375375
2. An <CodeStep step={3}>errorInfo</CodeStep> object that contains the <CodeStep step={4}>componentStack</CodeStep> of the error.
376376
377-
<ExperimentalBadge /> With <CodeStep step={5}>[`captureOwnerStack`](/reference/react/captureOwnerStack)</CodeStep> you can include the Owner Stack during development.
377+
<CanaryBadge /> With <CodeStep step={5}>[`captureOwnerStack`](/reference/react/captureOwnerStack)</CodeStep> you can include the Owner Stack during development.
378378
379379
You can use the `onUncaughtError` root option to display error dialogs:
380380
@@ -543,7 +543,7 @@ export function reportRecoverableError({error, cause, componentStack, ownerStack
543543
```
544544
545545
```js src/index.js active
546-
// captureOwnerStack is only available in react@experimental.
546+
// captureOwnerStack is only available in react@canary.
547547
import { captureOwnerStack } from 'react';
548548
import { createRoot } from "react-dom/client";
549549
import App from "./App.js";
@@ -613,7 +613,7 @@ export default function App() {
613613
By default, React will log all errors caught by an Error Boundary to `console.error`. To override this behavior, you can provide the optional `onCaughtError` root option to handle errors caught by an [Error Boundary](/reference/react/Component#catching-rendering-errors-with-an-error-boundary):
614614
615615
```js [[1, 8, "onCaughtError"], [2, 8, "error", 1], [3, 8, "errorInfo"], [4, 12, "componentStack"], [5, 13, "captureOwnerStack()"]]
616-
// captureOwnerStack is only available in react@experimental.
616+
// captureOwnerStack is only available in react@canary.
617617
import { captureOwnerStack } from 'react';
618618
import { createRoot } from 'react-dom/client';
619619

@@ -638,7 +638,7 @@ The <CodeStep step={1}>onCaughtError</CodeStep> option is a function called with
638638
1. The <CodeStep step={2}>error</CodeStep> that was caught by the boundary.
639639
2. An <CodeStep step={3}>errorInfo</CodeStep> object that contains the <CodeStep step={4}>componentStack</CodeStep> of the error.
640640
641-
<ExperimentalBadge /> With <CodeStep step={5}>[`captureOwnerStack`](/reference/react/captureOwnerStack)</CodeStep> you can include the Owner Stack during development.
641+
<CanaryBadge /> With <CodeStep step={5}>[`captureOwnerStack`](/reference/react/captureOwnerStack)</CodeStep> you can include the Owner Stack during development.
642642
643643
You can use the `onCaughtError` root option to display error dialogs or filter known errors from logging:
644644
@@ -807,7 +807,7 @@ export function reportRecoverableError({error, cause, componentStack, ownerStack
807807
```
808808
809809
```js src/index.js active
810-
// captureOwnerStack is only available in react@experimental.
810+
// captureOwnerStack is only available in react@canary.
811811
import {captureOwnerStack} from 'react';
812812
import { createRoot } from "react-dom/client";
813813
import App from "./App.js";
@@ -904,7 +904,7 @@ function Throw({error}) {
904904
React may automatically render a component a second time to attempt to recover from an error thrown in render. If successful, React will log a recoverable error to the console to notify the developer. To override this behavior, you can provide the optional `onRecoverableError` root option:
905905
906906
```js [[1, 8, "onRecoverableError"], [2, 8, "error", 1], [3, 12, "error.cause"], [4, 8, "errorInfo"], [5, 13, "componentStack"], [6, 14, "captureOwnerStack()"]]
907-
// captureOwnerStack is only available in react@experimental.
907+
// captureOwnerStack is only available in react@canary.
908908
import { captureOwnerStack } from 'react';
909909
import { createRoot } from 'react-dom/client';
910910

@@ -930,7 +930,7 @@ The <CodeStep step={1}>onRecoverableError</CodeStep> option is a function called
930930
1. The <CodeStep step={2}>error</CodeStep> that React throws. Some errors may include the original cause as <CodeStep step={3}>error.cause</CodeStep>.
931931
2. An <CodeStep step={4}>errorInfo</CodeStep> object that contains the <CodeStep step={5}>componentStack</CodeStep> of the error.
932932
933-
<ExperimentalBadge /> With <CodeStep step={6}>[`captureOwnerStack`](/reference/react/captureOwnerStack)</CodeStep> you can include the Owner Stack during development.
933+
<CanaryBadge /> With <CodeStep step={6}>[`captureOwnerStack`](/reference/react/captureOwnerStack)</CodeStep> you can include the Owner Stack during development.
934934
935935
You can use the `onRecoverableError` root option to display error dialogs:
936936
@@ -1099,7 +1099,7 @@ export function reportRecoverableError({error, cause, componentStack, ownerStack
10991099
```
11001100
11011101
```js src/index.js active
1102-
// captureOwnerStack is only available in react@experimental.
1102+
// captureOwnerStack is only available in react@canary.
11031103
import {captureOwnerStack} from 'react'
11041104
import { createRoot } from "react-dom/client";
11051105
import App from "./App.js";

src/content/reference/react-dom/client/hydrateRoot.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ It is uncommon to call [`root.render`](#root-render) on a hydrated root. Usually
379379
By default, React will log all uncaught errors to the console. To implement your own error reporting, you can provide the optional `onUncaughtError` root option:
380380
381381
```js [[1, 9, "onUncaughtError"], [2, 9, "error", 1], [3, 9, "errorInfo"], [4, 13, "componentStack"], [5, 14, "captureOwnerStack()"]]
382-
// captureOwnerStack is only available in react@experimental.
382+
// captureOwnerStack is only available in react@canary.
383383
import { captureOwnerStack } from 'react';
384384
import { hydrateRoot } from 'react-dom/client';
385385

@@ -404,7 +404,7 @@ The <CodeStep step={1}>onUncaughtError</CodeStep> option is a function called wi
404404
1. The <CodeStep step={2}>error</CodeStep> that was thrown.
405405
2. An <CodeStep step={3}>errorInfo</CodeStep> object that contains the <CodeStep step={4}>componentStack</CodeStep> of the error.
406406
407-
<ExperimentalBadge /> With <CodeStep step={5}>[`captureOwnerStack`](/reference/react/captureOwnerStack)</CodeStep> you can include the Owner Stack during development.
407+
<CanaryBadge /> With <CodeStep step={5}>[`captureOwnerStack`](/reference/react/captureOwnerStack)</CodeStep> you can include the Owner Stack during development.
408408
409409
You can use the `onUncaughtError` root option to display error dialogs:
410410
@@ -576,7 +576,7 @@ export function reportRecoverableError({error, cause, componentStack, ownerStack
576576
```
577577
578578
```js src/index.js active
579-
// captureOwnerStack is only available in react@experimental.
579+
// captureOwnerStack is only available in react@canary.
580580
import { captureOwnerStack } from 'react';
581581
import { hydrateRoot } from "react-dom/client";
582582
import App from "./App.js";
@@ -646,7 +646,7 @@ export default function App() {
646646
By default, React will log all errors caught by an Error Boundary to `console.error`. To override this behavior, you can provide the optional `onCaughtError` root option for errors caught by an [Error Boundary](/reference/react/Component#catching-rendering-errors-with-an-error-boundary):
647647
648648
```js [[1, 9, "onCaughtError"], [2, 9, "error", 1], [3, 9, "errorInfo"], [4, 13, "componentStack"], [5, 14, "captureOwnerStack()"]]
649-
// captureOwnerStack is only available in react@experimental.
649+
// captureOwnerStack is only available in react@canary.
650650
import { captureOwnerStack } from 'react';
651651
import { hydrateRoot } from 'react-dom/client';
652652

@@ -671,7 +671,7 @@ The <CodeStep step={1}>onCaughtError</CodeStep> option is a function called with
671671
1. The <CodeStep step={2}>error</CodeStep> that was caught by the boundary.
672672
2. An <CodeStep step={3}>errorInfo</CodeStep> object that contains the <CodeStep step={4}>componentStack</CodeStep> of the error.
673673
674-
<ExperimentalBadge /> With <CodeStep step={5}>[`captureOwnerStack`](/reference/react/captureOwnerStack)</CodeStep> you can include the Owner Stack during development.
674+
<CanaryBadge /> With <CodeStep step={5}>[`captureOwnerStack`](/reference/react/captureOwnerStack)</CodeStep> you can include the Owner Stack during development.
675675
676676
You can use the `onCaughtError` root option to display error dialogs or filter known errors from logging:
677677
@@ -843,7 +843,7 @@ export function reportRecoverableError({error, cause, componentStack}) {
843843
```
844844
845845
```js src/index.js active
846-
// captureOwnerStack is only available in react@experimental.
846+
// captureOwnerStack is only available in react@canary.
847847
import {captureOwnerStack} from 'react';
848848
import { hydrateRoot } from "react-dom/client";
849849
import App from "./App.js";
@@ -939,7 +939,7 @@ function Throw({error}) {
939939
When React encounters a hydration mismatch, it will automatically attempt to recover by rendering on the client. By default, React will log hydration mismatch errors to `console.error`. To override this behavior, you can provide the optional `onRecoverableError` root option:
940940
941941
```js [[1, 9, "onRecoverableError"], [2, 9, "error", 1], [3, 13, "error.cause", 1], [4, 9, "errorInfo"], [5, 14, "componentStack"], [6, 15, "captureOwnerStack()"]]
942-
// captureOwnerStack is only available in react@experimental.
942+
// captureOwnerStack is only available in react@canary.
943943
import { captureOwnerStack } from 'react';
944944
import { hydrateRoot } from 'react-dom/client';
945945

@@ -965,7 +965,7 @@ The <CodeStep step={1}>onRecoverableError</CodeStep> option is a function called
965965
1. The <CodeStep step={2}>error</CodeStep> React throws. Some errors may include the original cause as <CodeStep step={3}>error.cause</CodeStep>.
966966
2. An <CodeStep step={4}>errorInfo</CodeStep> object that contains the <CodeStep step={5}>componentStack</CodeStep> of the error.
967967
968-
<ExperimentalBadge /> With <CodeStep step={6}>[`captureOwnerStack`](/reference/react/captureOwnerStack)</CodeStep> you can include the Owner Stack during development.
968+
<CanaryBadge /> With <CodeStep step={6}>[`captureOwnerStack`](/reference/react/captureOwnerStack)</CodeStep> you can include the Owner Stack during development.
969969
970970
You can use the `onRecoverableError` root option to display error dialogs for hydration mismatches:
971971
@@ -1137,7 +1137,7 @@ export function reportRecoverableError({error, cause, componentStack, ownerStack
11371137
```
11381138
11391139
```js src/index.js active
1140-
// captureOwnerStack is only available in react@experimental.
1140+
// captureOwnerStack is only available in react@canary.
11411141
import {captureOwnerStack} from 'react'
11421142
import { hydrateRoot } from "react-dom/client";
11431143
import App from "./App.js";

src/content/reference/react/Component.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ By default, if your application throws an error during rendering, React will rem
12731273
12741274
To implement an error boundary component, you need to provide [`static getDerivedStateFromError`](#static-getderivedstatefromerror) which lets you update state in response to an error and display an error message to the user. You can also optionally implement [`componentDidCatch`](#componentdidcatch) to add some extra logic, for example, to log the error to an analytics service.
12751275
1276-
<ExperimentalBadge /> With [`captureOwnerStack`](/reference/react/captureOwnerStack) you can include the Owner Stack during development.
1276+
<CanaryBadge /> With [`captureOwnerStack`](/reference/react/captureOwnerStack) you can include the Owner Stack during development.
12771277
12781278
```js {9-12,14-27}
12791279
import * as React from 'react';
@@ -1298,7 +1298,7 @@ class ErrorBoundary extends React.Component {
12981298
// in div (created by App)
12991299
// in App
13001300
info.componentStack,
1301-
// Only available in react@experimental.
1301+
// Only available in react@canary.
13021302
// Warning: Owner Stack is not available in production.
13031303
React.captureOwnerStack(),
13041304
);

src/content/reference/react/captureOwnerStack.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@
22
title: captureOwnerStack
33
---
44

5-
<Wip>
5+
<Canary>
66

7-
**This API is experimental and is not available in a stable version of React yet.**
7+
The `captureOwnerStack` API is currently only available in React's Canary and experimental channels. Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
88

9-
You can try it by upgrading React packages to the most recent experimental version:
10-
11-
- `react@experimental`
12-
13-
Experimental versions of React may contain bugs. Don't use them in production.
14-
15-
</Wip>
9+
</Canary>
1610

1711
<Intro>
1812

0 commit comments

Comments
 (0)