Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of React Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-react-knowledge-patch)
---
name: react-knowledge-patch
description: React
version: "19.2.0"
license: MIT
metadata:
author: Nevaberry
---
# React Knowledge Patch
Load this skill for React migration and compatibility work, server rendering,
Server Components, Activity, Effect Events, View Transitions, compiler and lint
configuration, and platform tooling. Use the topic references for complete
behavior, examples, and release-specific attribution.
## Reference index
| Reference | Topics |
| --- | --- |
| [React migration](references/react-19-migration.md) | Integration breaks, refs, hydration, DOM props, forms, and legacy React migration |
| [Security](references/security.md) | RSC vulnerabilities, framework upgrades, Native patch scope, and Trusted Types |
| [Compiler and lint](references/compiler-and-lint.md) | ESLint presets, compiler diagnostics, setup, dependencies, and upgrade pins |
| [Activity and Effects](references/activity-and-effects.md) | Hidden UI, pre-rendering, hydration, Effect Events, Strict Mode, and suspended reads |
| [Server rendering](references/server-rendering.md) | Cache cancellation, prerender/resume, streaming, resources, CSP, and RSC integrations |
| [View Transitions](references/view-transitions.md) | Availability, activation, boundaries, pairing, classes, cleanup, and navigation |
| [Tooling and platforms](references/tooling-and-platforms.md) | Performance tracks, renderer diagnostics, React Native, legacy JSX tools, and archives |
## Breaking changes and upgrade requirements
### RSC security patches
Audit server deployments with RSC support even when the app defines no Server
Functions or a framework supplies the affected package. Upgrade the installed
integration to a current patched release even if the hosting provider has
applied a mitigation. The updated guidance covers denial of service and source
exposure as well as the original remote code execution vulnerability.
A standalone React Native app without `react-dom` can keep its pinned `react`.
In a React Native monorepo, patch only installed affected `react-server-dom-*`
packages to preserve React Native's version pairing. See the security reference
for affected versions and the framework-specific upgrade paths.
### Server Action data and private entry points
React 19.0.6, 19.1.7, and 19.2.6 can drop entries from Server Action `FormData`;
the respective fixes are 19.0.7, 19.1.8, and 19.2.7.
React 19.1.3 and 19.2.2 remove `react-server-dom-webpack/*.unbundled` imports
and move the implementation to private `react-server-dom-unbundled`. Use the
supported entry point for the integration's bundler and runtime.
### Containers, custom renderers, and test builds
React DOM 19.1 removes HTML comment containers. Give integrations mounting at
comment markers an element container at that location. React DOM warns when a
React-owned node containing text is used as a container; use a dedicated empty
element.
React 19.2 reorders positional parameters after the `on*` callbacks in
`react-reconciler`'s `createContainer` and `createHydrationContainer`; check both
call sites. React 19.1 removes `act` from production exports, so use a development
build for test code importing it.
### Lint presets and compiler upgrades
Hooks ESLint v6 uses flat config for `recommended`. Existing eslintrc projects
can retain the legacy configuration with `recommended-legacy`:
```json
{
"extends": ["plugin:react-hooks/recommended-legacy"]
}
```
Replace `eslint-plugin-react-compiler` with an updated
`eslint-plugin-react-hooks`. Its `recommended` and `recommended-latest` presets
include compiler diagnostics and can run without `babel-plugin-react-compiler`.
A compiler upgrade can change memoized value identity and when dependent Effects
run. If test coverage is limited, pin an exact version and check the app when
upgrading manually:
```sh
npm install --save-dev --save-exact babel-plugin-react-compiler@1.0.0
```
### Native architecture and legacy migrations
Migrate apps on the Legacy Architecture before upgrading to React Native 0.82,
which runs exclusively on the New Architecture.
For legacy React migrations, the migration reference covers removed top-level
React DOM aliases, `react/addons`, `cloneWithProps`, DOM ref properties, and
`getDOMNode()`, plus changes to DOM output, children, state, and events. The
tooling reference covers deprecated `react-tools` and `JSXTransformer.js`, Babel
transforms, JSX parsing, source maps, and ES3 targeting.
## Activity and Effect Events
An initially hidden `<Activity>` can pre-render lazy components and warm
Suspense-enabled data on the client. Fetches started in Effects wait until the
boundary is visible. Server HTML omits hidden boundary children; an always-visible
Activity lets React hydrate its children separately and prioritize them when a
user interacts.
Hidden bare text produces no DOM output. Retained DOM such as `<video>` can
continue playing while hidden; use a layout Effect cleanup when playback needs
to stop as the UI hides.
`useEffectEvent` returns a new function identity on every render; omit it from
dependency arrays. Keep calls local to the defining component or custom Hook,
inside `useEffect`, `useLayoutEffect`, `useInsertionEffect`, or another Effect
Event. An Effect can register a listener that calls the event later and reads
the latest committed values.
For Activity portal, metadata, and error behavior, Strict Mode Effect replay,
independent transitions, and conditional `use()` warnings, see the Activity and
Effects reference.
## Server rendering and cache lifetimes
### Cancel cached work and resume deferred content
`cacheSignal()` aborts when Server Components rendering finishes successfully,
is aborted, or fails, letting cached work release resources when the render
stops using them:
```js
import { cache, cacheSignal } from "react";
export const loadData = cache(async (url) => {
const response = await fetch(url, { signal: cacheSignal() });
return response.json();
});
```
Pass an abort signal to `prerender` to capture `prelude` and any `postponed` state.
Serve the prelude as the shell, then pass the same tree and saved state to
`resume` to stream deferred content. The server rendering reference includes
the Web Streams and Node stream variants.
Node.js supports `renderToReadableStream` and `prerender` alongside Web Stream
resume APIs. Configure compression explicitly when serving compressed Web
Stream responses. `progressiveChunkSize` specifies streaming chunk size in bytes.
### Resources and hydration
React groups stylesheet links in `<head>` by `precedence`, ordering groups by
first appearance. It waits for external stylesheets before revealing dependent
content, including stylesheets discovered after server streaming starts.
External async scripts are emitted in `<head>` during server rendering even
when declared in `<body>`; repeated declarations of the same script load and
execute it once. Hoistable `<style>` elements accept a CSP `nonce`.
React briefly batches nearby server-rendered Suspense reveals and can reveal
immediately as page load approaches the 2.5-second Largest Contentful Paint
threshold. If a dehydrated Suspense boundary suspends again, its server-rendered
content is hidden until the boundary resolves.
### Browser handoff and server integrations
Call `use(browser())` inside `<Suspense>` to render its fallback on the server
and run the gated component in the browser. The handoff is intentional;
`react-dom/server` provides optional `onBrowserBailout` observation. See the
server rendering reference for attribution and the complete example.
The reference also covers `onHeaders`, bootstrap integrity and nonces, error
metadata, shell-error handling, Bun exports, client context providers, partial
Flight streams, error transport, and experimental RSC prerendering.
## View Transitions
React 19.3.0 makes `<ViewTransition>` and `addTransitionType` stable. The View
Transitions reference also retains the Canary and Experimental guidance, which
describes the following behavior.
Eligible commits come from `startTransition`, `useDeferredValue`, or a Suspense
reveal. An urgent update alone leaves the boundary inactive; `flushSync` during
the transition can make React skip the animation.
Place boundaries above the first DOM node of inserted or removed subtrees for
enter and exit. For list reorders, preserve stable keys and place boundaries
above item DOM wrappers. A boundary outside Suspense treats a reveal as an
update; separate fallback and content boundaries give exit and enter.
Shared elements need the same `name` in one replacement commit, unique among
mounted boundaries across the app. A separating Suspense fallback or either
side being outside the viewport prevents pairing.
Animation props accept `"auto"`, `"none"`, classes, or maps keyed by strings
registered with `addTransitionType`, with an inner `default` for unmatched
types. Events receive `(instance, types)` and can return animation cleanup.
Release navigation waiting on React in `useLayoutEffect`. React skips legacy
`popstate` animations; use the Navigation API for animated back navigation.
## DOM compatibility, compiler setup, and profiling
Custom element server props emit strings, numbers, and `true` as attributes,
omitting `false`, objects, symbols, and functions. Client rendering assigns a prop
to the custom element's property if it exists and otherwise uses an attribute.
Callback refs for class instances and `useImperativeHandle` handles can return
cleanup that React runs on unmount. React 19.3.0 makes refs on explicit
`<Fragment>` elements stable; the migration reference also covers Canary usage.
New Expo SDK 54 and later apps scaffolded with `create-expo-app` enable React
Compiler by default. With `create-vite` or `create-next-app`, select a
compiler-enabled template. React Compiler 1.0 can track `item?.label` and
`items[index]` as memoization dependencies.
In Chrome DevTools' Performance panel, the Scheduler track distinguishes an
update waiting on another priority's work from React waiting for paint. A
`Blocked` entry in Components means rendering yielded to work outside React.