Commit Graph

188 Commits

Author SHA1 Message Date
Lauren Tan
8d1b0d7abc Upgrade to stable react compiler
Upgrade to latest
2025-10-07 13:18:43 -07:00
Sebastian "Sebbie" Silbermann
249535378a Bump ViewTransition and Fragment ref docs to canary (#8048) 2025-10-07 08:08:39 -07:00
Sebastian "Sebbie" Silbermann
28e9bd9fa2 Document React's profiling build (#8054) 2025-10-06 13:47:38 -04:00
lauren
7b8612ec41 Update eslint-plugin-react-hooks version reference (#8051)
Updates all mentions of eslint-plugin-react-hooks rc and 6.1.0 to refer to the new 6.1.1 which has important bugfixes.
2025-10-03 19:03:28 -04:00
Jack Pope
ae584af4da Add experimental docs for Fragment refs (#8010)
* Add experimental docs for Fragment refs

* Update wording

* Address feedback
2025-10-03 10:35:59 -04:00
dan
9850724eb4 Upgrade sandboxes to 19.2 (#8037)
* Use stable release in demos with HTML output

* Fix Activity sandboxes (#8035)

* Fix Activity sandboxes

* hacky fix

* Revert "Fix Activity sandboxes (#8035)"

This reverts commit f9fd07ca59.

* Bump to 19.2

* cleanup rest of sandpacks

* Pin deps

* Add back package.json with third-party deps

* "^" should be fixed now

* add back package.json for more toastify deps

* fuggin whitespace

* more fuggin whitespace

* fml like fr fr

---------

Co-authored-by: Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
Co-authored-by: Ricky <rickhanlonii@gmail.com>
Co-authored-by: Rick Hanlon <rickhanlonii@meta.com>
2025-10-02 09:58:19 -04:00
Ricky
f9fd07ca59 Fix Activity sandboxes (#8035)
* Fix Activity sandboxes

* hacky fix
2025-10-01 19:23:34 -04:00
Jack Pope
0a803f61d8 Update eslint-plugin-react-hooks config docs (#8030)
We're updating eslint-plugin-react-hooks with support for useEffectEvent usage and updated configuration options for applying the useEffectEvent and other effect rules to custom effect hooks.

This adds the documentation for the config syntax and adds mention to the useEffectEvent reference page that the linter should be used to ensure proper usage of Effect Events.
2025-10-01 17:55:59 -04:00
Ricky
c3d7560005 Blog post for React 19.2 (#8028)
* wip

* feedback and rm canary stuff

* tweak

* fix json

* more canary stuff

* fix link

* update dates

* update meta description

* Expand performance track section

* adjust linter note

* edit perf tracks down

* edit perf tracks down more

* tweak note

* tweak useEffectEvent

* formatting

* tweaks

* ppr

* rm canary stuff

* fix json

* fix json

* tweaks

* linter note

* nit

* nit

* link

* nit

* ppr

* missing await

* add lint v6

* fix link

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2025-10-01 17:42:52 -04:00
Sebastian "Sebbie" Silbermann
3f0235be3d Docs for cacheSignal (#8023)
* Docs for `cacheSignal`

* Apply suggestion from review

Co-authored-by: Sebastian Markbåge <sebastian@calyptus.eu>

* Apply suggestion from review

Co-authored-by: Sebastian Markbåge <sebastian@calyptus.eu>

* Update src/content/reference/react/cacheSignal.md

---------

Co-authored-by: Sebastian Markbåge <sebastian@calyptus.eu>
2025-10-01 08:20:52 -04:00
Jack Pope
49c2d26722 Update useEffectEvent docs for canary (#8025)
* Update useEffectEvent docs for canary

* Clean up prefixed imports

* Fix import

* Update blog post link
2025-09-28 11:36:27 -04:00
Radoš Milićev
1b20061b10 Fix value wrongly formatted as code in useDeferredValue.md (#8024) 2025-09-26 18:15:37 +02:00
Eugene Choi
790625fd22 Fix ViewTransition examples (#7999)
* Fix view transition example

* Empty commit

* Fix fullscreen example
2025-09-23 17:25:52 -04:00
Radoš Milićev
170e5b904a Remove unnecessary spaces from useCallback.md (#8006) 2025-09-23 09:58:55 +02:00
Ricky
c8211fc21e Add RC badge to RC-only lint rules (#8005) 2025-09-22 10:18:10 -04:00
lauren
366b5fbdad Add new eslint rule reference docs (#7986)
Adds new docs for our new eslint rules.
2025-09-19 16:19:48 -04:00
lauren
730d045c71 Restore lint corrections from #7989 (#7997)
* Ignore braces when building Sandpack file map

Previously, `createFileMap` split the MDX meta string on spaces and assumed the first token was the filename. Once we prefixed code fences with `{expectedErrors: ...}`, it would incorrectly parse the meta and crash.

This PR updates createFileMap to skip tokens in the meta containing a start and end brace pair (using a stack to ensure we close on the correct brace) while tokenizing the meta string as expected.

Test plan: pages reported in #7994 no longer crash on the next PR

Closes #7994

* Restore lint corrections from #7989

Reverts the revert now that we've fixed the bug. These pages should no longer crash:

https://react-dev-git-pr7997-fbopensource.vercel.app/learn/referencing-values-with-refs
https://react-dev-git-pr7997-fbopensource.vercel.app/learn/synchronizing-with-effects
https://react-dev-git-pr7997-fbopensource.vercel.app/learn/separating-events-from-effects
https://react-dev-git-pr7997-fbopensource.vercel.app/learn/removing-effect-dependencies
https://react-dev-git-pr7997-fbopensource.vercel.app/learn/you-might-not-need-an-effect
2025-09-18 19:18:19 -04:00
lauren
2a9ef2d173 Revert "fix compiler errors (#7989)" (#7995)
This reverts commit 5cc9b7ba31.
2025-09-18 18:06:43 -04:00
lauren
5cc9b7ba31 fix compiler errors (#7989)
* Add local eslint rule to validate markdown codeblocks with React Compiler

In https://github.com/facebook/react/pull/34462 for example, we found an issue where the compiler was incorrectly validating an example straight from the docs.

In order to find more issues like this + also provide more feedback to doc authors on valid/invalid patterns, this PR adds a new local eslint rule which validates all markdown codeblocks containing components/hooks with React Compiler. An autofixer is also provided.

To express that a codeblock has an expected error, we can use the following metadata:

```ts
// pseudo type def
type MarkdownCodeBlockMetadata = {
    expectedErrors?: {
      'react-compiler'?: number[];
    };
  };
```

and can be used like so:

````
```js {expectedErrors: {'react-compiler': [4]}}
//  setState directly in render
function Component({value}) {
  const [count, setCount] = useState(0);
  setCount(value); // error on L4
  return <div>{count}</div>;
}
```
````

Because this is defined as a local rule, we don't have the same granular reporting that `eslint-plugin-react-hooks` yet. I can look into that later but for now this first PR just sets us up with something basic.

* fix compiler errors

I went through the list of existing errors and tried to separate the expected errors from those that seem to be flagging unexpected issues.  In particular, our effects validations are flagging patterns that our own docs examples use. I added todos for these and will follow up later.
2025-09-18 15:32:27 -04:00
Ricky
a5181c291f Bump Activity docs to canary (#7974)
* correct IconExperimental naming and usage (from #7972)

Co-authored-by: Tuna <198469603+TunaDev0@users.noreply.github.com>

* Bump Activity to Canary in docs

---------

Co-authored-by: Tuna <198469603+TunaDev0@users.noreply.github.com>
2025-09-12 12:47:11 -04:00
lauren
85ee6b205c Remove deprecated loremflickr placeholder images (#7968)
The previous examples used a service called loremflickr.com to link to  placeholder images. Since that service is now down, I updated them to reference placecats.com instead, which we already use in other examples as well. placecats doesn't have the same random cat feature so I roughly approximated it in the example code.

Closes #7966
2025-09-03 13:33:41 -04:00
Fergus Ruston
337d5eaf7d docs: minor grammar correction (#7906)
`a expensive` should be `an expensive`
2025-09-02 13:58:37 -04:00
Raghunath Prabhakar
0cc37ee979 fix: typo (#7914) 2025-09-02 13:42:32 -04:00
Brooks Lybrand
73a5fdd7fa docs: fix typo in update useTransition.md (#7936) 2025-09-02 12:39:02 -04:00
Sam Selikoff
27d86ffe6e Touch-ups to Activity (#7940) 2025-08-22 15:04:04 -07:00
Sam Selikoff
e9a7cb1b6c Updates to Activity docs (#7884)
* Updates to Activity docs

* wip

* Updates to Activity docs:

- New intro at top of Reference
- Adds "Deferring hydration of low-priority content" section
- Move "Preventing hidden content from having unwanted side effects" section to Troubleshooting
- Removes SSR section from Troubleshooting

* useLayoutEffect + Tidying up

* Use the same color code step for "visible"

* Tidy

* Typo

* Update section on selective hydration

* Update title

* Clean up props

* Tweak wording

* wip

* wip

* wip

* remove temporary scroll restoration while working on docs

* wip

* wip
2025-08-08 08:27:36 -07:00
lauren
b165e71f4f [compiler] Rewrite React Compiler Docs (#7868)
* Fix deadlinks take 2

Fixes the actual broken links.

```
$ yarn deadlinks

yarn run v1.22.22
$ node scripts/deadLinkChecker.js
Checking 177 markdown files...
Fetched 552 React error codes
Loaded 49 redirects from vercel.json

✓ All 1554 links are valid!

  Done in 0.86s.
```

* [compiler] Rewrite React Compiler Docs

We've received [feedback](https://bsky.app/profile/danabra.mov/post/3lr46ciujjs2r) that the compiler docs are difficult to understand and not prominent enough that people don't realize the compiler is a serious project and is near stable.

This PR rewrites the whole compiler doc section, giving it its own category as well as a standalone reference page.

Preview: https://react-dev-git-pr7868-fbopensource.vercel.app/
2025-07-21 12:41:10 -04:00
lauren
aa5448dc1c Fix deadlinks take 2 (#7883)
Fixes the actual broken links.

```
$ yarn deadlinks

yarn run v1.22.22
$ node scripts/deadLinkChecker.js
Checking 177 markdown files...
Fetched 552 React error codes
Loaded 49 redirects from vercel.json

✓ All 1554 links are valid!

  Done in 0.86s.
```
2025-07-21 12:12:36 -04:00
lauren
8ad6c604f5 Revert "Fix deadlinks (#7880)" (#7881)
Original commit changeset: d52b3ec734

Revert this so we can just fix the real deadlinks.
2025-07-21 11:54:00 -04:00
lauren
d52b3ec734 Fix deadlinks (#7880)
* [be] Add deadlinks script

While rewriting the compiler docs I happened to notice some deadlinks. This PR adds a new `yarn deadlinks` script to identify all deadlinks.

I decided to make this a script for now for simplicity but in the future could be ported to an ESlint rule.

The script handles:

- [x] checks images correctly (images are stored in /public but links can omit the /public)
- [x] looks up React error codes for dynamic error pages
- [x] lints links to contributors and uses URL from acknowledgements page if the member is no longer active on the core team
- [x] special injected anchor tags like #recap and #challenges

Example:

```
yarn run v1.22.22
$ node scripts/deadLinkChecker.js
Checking 177 markdown files...
Fetched 552 React error codes

src/content/learn/add-react-to-an-existing-project.md:23:58
  Link text: React-based frameworks
  URL: /learn/start-a-new-react-project
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/learn/add-react-to-an-existing-project.md:27:45
  Link text: benefit from the best practices
  URL: /learn/start-a-new-react-project#can-i-use-react-without-a-framework
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/learn/add-react-to-an-existing-project.md:152:269
  Link text: a React framework
  URL: /learn/start-a-new-react-project
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/learn/synchronizing-with-effects.md:735:18
  Link text: framework
  URL: /learn/start-a-new-react-project#production-grade-react-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/learn/typescript.md:16:3
  Link text: Common types from `@types/react`
  URL: /learn/typescript/#useful-types
  ✗ Target file not found for: /learn/typescript/

src/content/learn/typescript.md:17:3
  Link text: Further learning locations
  URL: /learn/typescript/#further-learning
  ✗ Target file not found for: /learn/typescript/

src/content/learn/typescript.md:23:5
  Link text: production-grade React frameworks
  URL: /learn/start-a-new-react-project#production-grade-react-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/learn/you-might-not-need-an-effect.md:29:399
  Link text: frameworks
  URL: /learn/start-a-new-react-project#production-grade-react-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/learn/you-might-not-need-an-effect.md:754:106
  Link text: frameworks
  URL: /learn/start-a-new-react-project#production-grade-react-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/learn/your-first-component.md:218:1
  Link text: React-based frameworks
  URL: /learn/start-a-new-react-project
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/react/ViewTransition.md:146:248
  Link text: reveal content
  URL: /link-to-suspense-below
  ✗ Target file not found for: /link-to-suspense-below

src/content/reference/react/captureOwnerStack.md:60:94
  Link text: `errorInfo.componentStack` in `onUncaughtError`
  URL: /reference/react-dom/client/hydrateRoot#show-a-dialog-for-uncaught-errors
  ✗ Anchor #show-a-dialog-for-uncaught-errors not found in reference/react-dom/client/hydrateRoot.md

src/content/reference/react/forwardRef.md:9:65
  Link text: here
  URL: /blog/2024/04/25/react-19#ref-as-a-prop
  ✗ Target file not found for: /blog/2024/04/25/react-19

src/content/reference/react/use.md:315:24
  Link text: Server Component
  URL: /reference/react/components#server-components
  ✗ Anchor #server-components not found in reference/react/components.md

src/content/reference/react/useEffect.md:899:67
  Link text: if you use a framework,
  URL: /learn/start-a-new-react-project#production-grade-react-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/react/useEffect.md:1051:18
  Link text: framework
  URL: /learn/start-a-new-react-project#production-grade-react-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/react/useEffect.md:1736:92
  Link text: framework
  URL: /learn/start-a-new-react-project#production-grade-react-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/react/useInsertionEffect.md:136:65
  Link text: non-blocking update,
  URL: /reference/react/useTransition#marking-a-state-update-as-a-non-blocking-transition
  ✗ Anchor #marking-a-state-update-as-a-non-blocking-transition not found in reference/react/useTransition.md

src/content/reference/react-dom/createPortal.md:53:76
  Link text: key.
  URL: /learn/rendering-lists/#keeping-list-items-in-order-with-key
  ✗ Target file not found for: /learn/rendering-lists/

src/content/reference/react-dom/index.md:24:1
  Link text: React-based frameworks
  URL: /learn/start-a-new-react-project
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/react-dom/index.md:51:3
  Link text: `unmountComponentAtNode`
  URL: /reference/react-dom/unmountComponentAtNode
  ✗ Target file not found for: /reference/react-dom/unmountComponentAtNode

src/content/reference/react-dom/preinit.md:7:1
  Link text: React-based frameworks
  URL: /learn/start-a-new-react-project
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/react-dom/preinitModule.md:7:1
  Link text: React-based frameworks
  URL: /learn/start-a-new-react-project
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/react-dom/preload.md:7:1
  Link text: React-based frameworks
  URL: /learn/start-a-new-react-project
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/react-dom/preloadModule.md:7:1
  Link text: React-based frameworks
  URL: /learn/start-a-new-react-project
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/rsc/directives.md:13:36
  Link text: bundlers compatible with React Server Components
  URL: /learn/start-a-new-react-project#full-stack-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/rsc/server-components.md:7:34
  Link text: React Server Components
  URL: /learn/start-a-new-react-project#full-stack-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/rsc/server-functions.md:198:28
  Link text: `useActionState`
  URL: /reference/react-dom/hooks/useFormState
  ✗ Target file not found for: /reference/react-dom/hooks/useFormState

src/content/reference/rsc/server-functions.md:222:28
  Link text: `useActionState`
  URL: /reference/react-dom/hooks/useFormState
  ✗ Target file not found for: /reference/react-dom/hooks/useFormState

src/content/reference/rsc/use-client.md:44:77
  Link text: compatible bundlers
  URL: /learn/start-a-new-react-project#full-stack-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/rsc/use-server.md:98:54
  Link text: serializable props
  URL: /reference/rsc/use-client#passing-props-from-server-to-client-components
  ✗ Anchor #passing-props-from-server-to-client-components not found in reference/rsc/use-client.md

src/content/reference/react-dom/client/createRoot.md:212:278
  Link text: using a framework
  URL: /learn/start-a-new-react-project#production-grade-react-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/react-dom/client/index.md:7:185
  Link text: framework
  URL: /learn/start-a-new-react-project#production-grade-react-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/react-dom/components/common.md:919:89
  Link text: check out more examples.
  URL: /reference/react/useRef#examples-dom
  ✗ Anchor #examples-dom not found in reference/react/useRef.md

src/content/reference/react-dom/components/form.md:39:23
  Link text: common element props.
  URL: /reference/react-dom/components/common#props
  ✗ Anchor #props not found in reference/react-dom/components/common.md

src/content/reference/react-dom/components/form.md:233:63
  Link text: reference documentation
  URL: /reference/react/hooks/useOptimistic
  ✗ Target file not found for: /reference/react/hooks/useOptimistic

src/content/reference/react-dom/components/input.md:33:24
  Link text: common element props.
  URL: /reference/react-dom/components/common#props
  ✗ Anchor #props not found in reference/react-dom/components/common.md

src/content/reference/react-dom/components/link.md:33:23
  Link text: common element props.
  URL: /reference/react-dom/components/common#props
  ✗ Anchor #props not found in reference/react-dom/components/common.md

src/content/reference/react-dom/components/meta.md:33:23
  Link text: common element props.
  URL: /reference/react-dom/components/common#props
  ✗ Anchor #props not found in reference/react-dom/components/common.md

src/content/reference/react-dom/components/option.md:39:25
  Link text: common element props.
  URL: /reference/react-dom/components/common#props
  ✗ Anchor #props not found in reference/react-dom/components/common.md

src/content/reference/react-dom/components/progress.md:33:27
  Link text: common element props.
  URL: /reference/react-dom/components/common#props
  ✗ Anchor #props not found in reference/react-dom/components/common.md

src/content/reference/react-dom/components/script.md:34:25
  Link text: common element props.
  URL: /reference/react-dom/components/common#props
  ✗ Anchor #props not found in reference/react-dom/components/common.md

src/content/reference/react-dom/components/select.md:39:25
  Link text: common element props.
  URL: /reference/react-dom/components/common#props
  ✗ Anchor #props not found in reference/react-dom/components/common.md

src/content/reference/react-dom/components/style.md:33:24
  Link text: common element props.
  URL: /reference/react-dom/components/common#props
  ✗ Anchor #props not found in reference/react-dom/components/common.md

src/content/reference/react-dom/components/textarea.md:33:27
  Link text: common element props.
  URL: /reference/react-dom/components/common#props
  ✗ Anchor #props not found in reference/react-dom/components/common.md

src/content/reference/react-dom/components/title.md:33:24
  Link text: common element props.
  URL: /reference/react-dom/components/common#props
  ✗ Anchor #props not found in reference/react-dom/components/common.md

src/content/reference/react-dom/server/index.md:7:182
  Link text: framework
  URL: /learn/start-a-new-react-project#production-grade-react-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/reference/react-dom/static/index.md:7:146
  Link text: framework
  URL: /learn/start-a-new-react-project#production-grade-react-frameworks
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/blog/2023/03/16/introducing-react-dev.md:45:5
  Link text: API Reference
  URL: /reference
  ✗ Target file not found for: /reference

src/content/blog/2023/03/16/introducing-react-dev.md:610:117
  Link text: Alternatives
  URL: /reference/react-dom/findDOMNode#alternatives
  ✗ Target file not found for: /reference/react-dom/findDOMNode

src/content/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023.md:34:40
  Link text: Next.js App Router
  URL: /learn/start-a-new-react-project#nextjs-app-router
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023.md:95:605
  Link text: Next.js App Router
  URL: /learn/start-a-new-react-project#nextjs-app-router
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/blog/2024/02/15/react-labs-what-we-have-been-working-on-february-2024.md:110:3
  Link text: Sathya Gunasekaran
  URL: /community/team#sathya-gunasekaran
  ✗ Contributor link should be updated to: https://github.com/gsathya

src/content/blog/2024/04/25/react-19-upgrade-guide.md:132:20
  Link text: improved how errors are handled
  URL: /blog/2024/04/25/react-19#error-handling
  ✗ Target file not found for: /blog/2024/04/25/react-19

src/content/blog/2024/04/25/react-19-upgrade-guide.md:502:19
  Link text: `ref` as a prop
  URL: /blog/2024/04/25/react-19#ref-as-a-prop
  ✗ Target file not found for: /blog/2024/04/25/react-19

src/content/blog/2024/12/05/react-19.md:358:391
  Link text: Full-stack React Architecture
  URL: /learn/start-a-new-react-project#which-features-make-up-the-react-teams-full-stack-architecture-vision
  ✗ Target file not found for: /learn/start-a-new-react-project

src/content/blog/2024/12/05/react-19.md:392:28
  Link text: React Server Actions
  URL: /reference/rsc/server-actions
  ✗ Target file not found for: /reference/rsc/server-actions

src/content/blog/2025/04/23/react-labs-view-transitions-activity-and-more.md:2498:37
  Link text: view transition classes
  URL: /reference/react/ViewTransition#view-transition-classes
  ✗ Anchor #view-transition-classes not found in reference/react/ViewTransition.md


Found 58 dead links out of 1555 total links

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

```

* Fix deadlinks

Following `yarn deadlinks` as a guide, I fixed the following deadlinks:

| File | Link Text | Current URL | Issue Type | Actual Fix Applied | Status |
|------|-----------|-------------|------------|-------------------|--------|
| `add-react-to-an-existing-project.md:23` | React-based frameworks | `/learn/start-a-new-react-project` | Missing file | `/learn/creating-a-react-app` |  Fixed |
| `add-react-to-an-existing-project.md:27` | benefit from the best practices | `/learn/start-a-new-react-project#can-i-use-react-without-a-framework` | Missing file + anchor | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `add-react-to-an-existing-project.md:152` | a React framework | `/learn/start-a-new-react-project` | Missing file | `/learn/creating-a-react-app` |  Fixed |
| `synchronizing-with-effects.md:735` | framework | `/learn/start-a-new-react-project#production-grade-react-frameworks` | Missing file + anchor | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `typescript.md:16` | Common types from `@types/react` | `/learn/typescript/#useful-types` | Trailing slash | `/learn/typescript#useful-types` |  Fixed |
| `typescript.md:17` | Further learning locations | `/learn/typescript/#further-learning` | Trailing slash | `/learn/typescript#further-learning` |  Fixed |
| `typescript.md:23` | production-grade React frameworks | `/learn/start-a-new-react-project#production-grade-react-frameworks` | Missing file + anchor | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `you-might-not-need-an-effect.md:29` | frameworks | `/learn/start-a-new-react-project#production-grade-react-frameworks` | Missing file + anchor | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `you-might-not-need-an-effect.md:754` | frameworks | `/learn/start-a-new-react-project#production-grade-react-frameworks` | Missing file + anchor | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `your-first-component.md:218` | React-based frameworks | `/learn/start-a-new-react-project` | Missing file | `/learn/creating-a-react-app` |  Fixed |
| `ViewTransition.md:146` | reveal content | `/link-to-suspense-below` | Placeholder URL | `/reference/react/Suspense#revealing-content-together-at-once` |  Fixed |
| `captureOwnerStack.md:60` | `errorInfo.componentStack` in `onUncaughtError` | `/reference/react-dom/client/hydrateRoot#show-a-dialog-for-uncaught-errors` | Missing anchor | `/reference/react-dom/client/hydrateRoot#error-logging-in-production` |  Fixed |
| `forwardRef.md:9` | here | `/blog/2024/04/25/react-19#ref-as-a-prop` | Missing file + anchor | `/blog/2024/12/05/react-19#ref-as-a-prop` |  Fixed |
| `use.md:315` | Server Component | `/reference/react/components#server-components` | Missing anchor | `/reference/rsc/server-components` |  Fixed |
| `useEffect.md:899` | if you use a framework, | `/learn/start-a-new-react-project#production-grade-react-frameworks` | Missing file + anchor | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `useEffect.md:1051` | framework | `/learn/start-a-new-react-project#production-grade-react-frameworks` | Missing file + anchor | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `useEffect.md:1736` | framework | `/learn/start-a-new-react-project#production-grade-react-frameworks` | Missing file + anchor | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `useInsertionEffect.md:136` | non-blocking update, | `/reference/react/useTransition#marking-a-state-update-as-a-non-blocking-transition` | Wrong anchor | `/reference/react/useTransition#perform-non-blocking-updates-with-actions` |  Fixed |
| `createPortal.md:53` | key. | `/learn/rendering-lists/#keeping-list-items-in-order-with-key` | Trailing slash | `/learn/rendering-lists#keeping-list-items-in-order-with-key` |  Fixed |
| `react-dom/index.md:24` | React-based frameworks | `/learn/start-a-new-react-project` | Missing file | `/learn/creating-a-react-app` |  Fixed |
| `react-dom/index.md:51` | `unmountComponentAtNode` | `/reference/react-dom/unmountComponentAtNode` | Missing file | `https://18.react.dev/reference/react-dom/unmountComponentAtNode` |  Fixed |
| `preinit.md:7` | React-based frameworks | `/learn/start-a-new-react-project` | Missing file | `/learn/creating-a-react-app` |  Fixed |
| `preinitModule.md:7` | React-based frameworks | `/learn/start-a-new-react-project` | Missing file | `/learn/creating-a-react-app` |  Fixed |
| `preload.md:7` | React-based frameworks | `/learn/start-a-new-react-project` | Missing file | `/learn/creating-a-react-app` |  Fixed |
| `preloadModule.md:7` | React-based frameworks | `/learn/start-a-new-react-project` | Missing file | `/learn/creating-a-react-app` |  Fixed |
| 11 component files | common element props. | `/reference/react-dom/components/common#props` | Wrong anchor | `/reference/react-dom/components/common#common-props` |  Fixed |
| `server/index.md:7` | framework | `/learn/start-a-new-react-project#production-grade-react-frameworks` | Missing file + anchor | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `static/index.md:7` | framework | `/learn/start-a-new-react-project#production-grade-react-frameworks` | Missing file + anchor | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `introducing-react-dev.md:45` | API Reference | `/reference` | Missing index | `/reference/react` |  Fixed |
| `introducing-react-dev.md:610` | Alternatives | `/reference/react-dom/findDOMNode#alternatives` | Missing file | `https://18.react.dev/reference/react-dom/findDOMNode#alternatives` |  Fixed |
| `react-labs-march-2023.md:34` | Next.js App Router | `/learn/start-a-new-react-project#nextjs-app-router` | Missing file + anchor | `/learn/creating-a-react-app#nextjs-app-router` |  Fixed |
| `react-labs-march-2023.md:95` | Next.js App Router | `/learn/start-a-new-react-project#nextjs-app-router` | Missing file + anchor | `/learn/creating-a-react-app#nextjs-app-router` |  Fixed |
| `react-labs-february-2024.md:110` | Sathya Gunasekaran | `/community/team#sathya-gunasekaran` | Contributor link | `https://github.com/gsathya` |  Fixed |
| `react-19-upgrade-guide.md:132` | improved how errors are handled | `/blog/2024/04/25/react-19#error-handling` | Missing file + anchor | `/blog/2024/12/05/react-19#error-handling` |  Fixed |
| `react-19-upgrade-guide.md:502` | `ref` as a prop | `/blog/2024/04/25/react-19#ref-as-a-prop` | Missing file + anchor | `/blog/2024/12/05/react-19#ref-as-a-prop` |  Fixed |
| `react-19.md:358` | Full-stack React Architecture | `/learn/start-a-new-react-project#which-features-make-up-the-react-teams-full-stack-architecture-vision` | Missing file + anchor | `/learn/creating-a-react-app#which-features-make-up-the-react-teams-full-stack-architecture-vision` |  Fixed |
| `react-19.md:392` | React Server Actions | `/reference/rsc/server-actions` | Missing file | `/reference/rsc/server-functions` |  Fixed |
| `view-transitions-activity.md:2498` | view transition classes | `/reference/react/ViewTransition#view-transition-classes` | Missing anchor | `/reference/react/ViewTransition#view-transition-class` |  Fixed |
| `rsc/directives.md:13` | bundlers compatible with React Server Components | `/learn/start-a-new-react-project#full-stack-frameworks` | Missing file | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `rsc/server-components.md:7` | React Server Components | `/learn/start-a-new-react-project#full-stack-frameworks` | Missing file | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `rsc/use-client.md:44` | compatible bundlers | `/learn/start-a-new-react-project#full-stack-frameworks` | Missing file | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `react-dom/client/createRoot.md:212` | using a framework | `/learn/start-a-new-react-project#production-grade-react-frameworks` | Missing file | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `react-dom/client/index.md:7` | framework | `/learn/start-a-new-react-project#production-grade-react-frameworks` | Missing file | `/learn/creating-a-react-app#full-stack-frameworks` |  Fixed |
| `rsc/server-functions.md:198` | `useActionState` | `/reference/react-dom/hooks/useFormState` | Missing file | `/reference/react/useActionState` |  Fixed |
| `rsc/server-functions.md:222` | `useActionState` | `/reference/react-dom/hooks/useFormState` | Missing file | `/reference/react/useActionState` |  Fixed |
| `rsc/use-server.md:98` | serializable props | `/reference/rsc/use-client#passing-props-from-server-to-client-components` | Missing anchor | `/reference/rsc/use-client#serializable-types` |  Fixed |
| `react-dom/components/common.md:919` | check out more examples. | `/reference/react/useRef#examples-dom` | Missing anchor | `/reference/react/useRef#usage` |  Fixed |
| `react-dom/components/form.md:233` | reference documentation | `/reference/react/hooks/useOptimistic` | Missing file | `/reference/react/useOptimistic` |  Fixed |


```
$ yarn deadlinks

yarn run v1.22.22
$ node scripts/deadLinkChecker.js
Checking 177 markdown files...
Fetched 552 React error codes


✓ All 1552 links are valid!

  Done in 1.07s.
```
2025-07-18 17:19:53 -04:00
Simon Schick
84a56968d9 docs(react): fix grammar in forward ref deprecation message (#7864) 2025-07-10 10:00:09 -04:00
Jan Kassens
5927c4e7d3 Replace Context.Provider with Context (#7838)
Update to be in line with the recommended way from React 19.

Docs https://react.dev/blog/2024/12/05/react-19#context-as-a-provider

---------

Co-authored-by: Ricky <rickhanlonii@gmail.com>
2025-06-03 15:08:53 -04:00
minami yoshihiko
c60173f9a4 docs: Refactor context provider usage (#7793)
* delete provider

* Fix NavContext usage in Talks component

* Fix TocContext and LanguagesContext usage in Page component

* Fix IllustrationContext usage in IllustrationBlock component

* Fix LevelContext and TasksContext usage in managing-state.md

* Fix ThemeContext and Context usage in MyApp component

* Fix HighlightContext usage in List component

* Fix ThemeContext usage in MyApp component

* Fix ErrorDecoderContext usage in ErrorDecoderPage component

* Fix ThemeContext usage in MyPage and MyApp components

* Fix ThemeContext usage in MyApp component

* Fix useContext documentation to correct context provider references

* Fix context provider references in createContext documentation

* prettier

* Update src/content/reference/react/createContext.md

---------

Co-authored-by: Ricky <rickhanlonii@gmail.com>
2025-06-03 12:29:34 -04:00
Jan Kassens
87cef4a918 Remove forwardRef reference from API listing (#7837)
This API is now under "Legacy APIs" and should probably no longer be listed as a "modern API".
2025-06-03 12:28:27 -04:00
Ajit
00587d6991 Add example of useActionState handling execution order (#7733) 2025-05-16 14:27:51 -04:00
Mehmet Mallı
a73055f821 docs: fix misplaced prepositional phrase error (#7799) 2025-05-16 11:58:25 -04:00
Ricky
a3e9466dfe fix action pattern in useTransition / useOptimistic (#7796)
* fix action pattern in useOptimistic

* update useTransition too
2025-04-30 10:18:55 -04:00
Ricky
d6c4c0fee5 Fix useOptimistic example (#7792)
* fix useOptimistic example

* prepend messages
2025-04-29 18:07:34 -04:00
Dhuruv Bansal
92dfd8c00c fixed typo (#7785) 2025-04-28 14:45:03 -04:00
Nick Walker
ecf75969ef docs: rename unstableViewTransition to unstable_ViewTransition (#7778) 2025-04-27 19:40:25 +01:00
Ricky
358d2be565 [blog + docs] React Labs: View Transitions, Activity, and more (#7772)
* init

* Add new error

* Bunch of updates

* Add addTransitionType

* Add Activity

* Expand on Activity

* Expand more on Activity

* Start on vt examples

* wip

* wip

* wip 2

* bump deploy

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* init

* Add new error

* Bunch of updates

* Add addTransitionType

* Add Activity

* Expand on Activity

* Expand more on Activity

* Start on vt examples

* wip

* wip

* wip 2

* bump deploy

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update existing VT examples to use video items

* Suspense animation example

* Add customization example

* typos

* Remove TODOs -- we might still want these but cutting scope

* Address wp feedback

* Fix reorder example

* wip

* wip

* wip

* wip

* fix activity iframe resize

---------

Co-authored-by: Jack Pope <jackpope1@gmail.com>
2025-04-23 11:27:48 -04:00
Yadiel Vélez
6ead1fae68 Add note about useId being allowed in non-async Server Components (#7715) 2025-04-07 12:35:20 +02:00
Ricky
3dfa3bdd23 Fix heading links in StrictMode (#7713) 2025-04-02 11:36:56 -04:00
Mysh!
b5c16dcffa fix(reference): declare subscribe before passing it to the hook (#7711) 2025-04-02 11:35:25 -04:00
Sebastian "Sebbie" Silbermann
b77c05d807 Misc captureOwnerStack cleanup after stable release (#7710)
1. Stop using `canary` for `captureOwnerStack` sandboxes
1. Remove remaining Canary badges from `captureOwnerStack` mentions
2025-04-02 10:52:21 +02:00
Ricky
38ee8d2a4f Add note about StrictMode not as the root component (#7702) 2025-03-31 12:58:06 -04:00
Jack Pope
9f87530c0e Remove captureOwnerStack canary banner (#7701)
* Remove captureOwnerStack canary banner

* Update nav and site config
2025-03-31 12:36:35 -04:00
Alex Safian
126d8c9aa5 Update nextjs link with the latest URL (#7389)
* Update nextjs link with the latest URL

The previous link redirected users to a 404 page.

* Update src/content/reference/react/useDeferredValue.md

---------

Co-authored-by: Ricky <rickhanlonii@gmail.com>
2025-02-18 00:43:08 -05:00
Sebastian "Sebbie" Silbermann
dfc4448e0d Reference docs for captureOwnerStack (#7427)
Co-authored-by: Ricky <rickhanlonii@fb.com>
2025-02-13 21:01:52 +01:00
Sruthi Krishnakumar
4d44167a43 import missing useState in the useEffect markdown file (#7457) 2025-01-27 11:25:15 -05:00