# React > `act`is a test helper to apply pending React updates before making assertions. ## Pages - [act](act.md): `act`is a test helper to apply pending React updates before making assertions. - [](activity.md): ``lets you hide and restore the UI and internal state of its children. - [Add React to an Existing Project](add-react-to-an-existing-project.md): If you want to add some interactivity to your existing project, you don't have to rewrite it in React. Add React to y... - [Adding Interactivity](adding-interactivity.md): Some things on the screen update in response to user input. For example, clicking an image gallery switches the activ... - [addTransitionType](addtransitiontype.md): **The`addTransitionType`API is currently only available in React’s Canary and Experimental channels.** - [Built-in React APIs](apis.md): In addition to [Hooks](/reference/react/hooks) and [Components](/reference/react/components), the`react`package exp... - [Build a React app from Scratch](build-a-react-app-from-scratch.md): If your app has constraints not well-served by existing frameworks, you prefer to build your own framework, or you ju... - [cache](cache.md): `cache`is only for use with [React Server Components](/reference/rsc/server-components). - [cacheSignal](cachesignal.md): `cacheSignal`is currently only used with [React Server Components](/blog/2023/03/22/react-labs-what-we-have-been-wor... - [captureOwnerStack](captureownerstack.md): `captureOwnerStack`reads the current Owner Stack in development and returns it as a string if available. - [Children](children.md): Using`Children`is uncommon and can lead to fragile code. See common alternatives. - [Choosing the State Structure](choosing-the-state-structure.md): Structuring state well can make a difference between a component that is pleasant to modify and debug, and one that i... - [cloneElement](cloneelement.md): Using`cloneElement`is uncommon and can lead to fragile code. See common alternatives. - [Common components (e.g.
)](common-eg-div.md): All built-in browser components, such as [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div), su... - [compilationMode](compilationmode.md): The`compilationMode`option controls how the React Compiler selects which functions to compile. - [Compiling Libraries](compiling-libraries.md): This guide helps library authors understand how to use React Compiler to ship optimized library code to their users. - [component-hook-factories](component-hook-factories.md): Validates against higher order functions defining nested components or hooks. Components and hooks should be defined ... - [Component](component.md): We recommend defining components as functions instead of classes. See how to migrate. - [Components and Hooks must be pure](components-and-hooks-must-be-pure.md): Pure functions only perform a calculation and nothing more. It makes your code easier to understand, debug, and allow... - [Built-in React Components](components.md): React exposes a few built-in components that you can use in your JSX. - [Conditional Rendering](conditional-rendering.md): Your components will often need to display different things depending on different conditions. In React, you can cond... - [config](config.md): Validates the compiler [configuration options](/reference/react-compiler/configuration). - [Configuration](configuration.md): This page lists all configuration options available in React Compiler. - [createContext](createcontext.md): `createContext`lets you create a [context](/learn/passing-data-deeply-with-context) that components can provide or r... - [createElement](createelement.md): `createElement`lets you create a React element. It serves as an alternative to writing [JSX.](/learn/writing-markup-... - [createPortal](createportal.md): `createPortal`lets you render some children into a different part of the DOM. - [createRef](createref.md): `createRef`is mostly used for [class components.](/reference/react/Component) Function components typically rely on ... - [createRoot](createroot.md): `createRoot`lets you create a root to display React components inside a browser DOM node. - [Creating a React App](creating-a-react-app.md): If you want to build a new app or website with React, we recommend starting with a framework. - [Debugging and Troubleshooting](debugging-and-troubleshooting.md): This guide helps you identify and fix issues when using React Compiler. Learn how to debug compilation problems and r... - [Describing the UI](describing-the-ui.md): React is a JavaScript library for rendering user interfaces (UI). UI is built from small units like buttons, text, an... - [Directives](directives.md): Directives are for use in [React Server Components](/reference/rsc/server-components). - [Editor Setup](editor-setup.md): A properly configured editor can make code clearer to read and faster to write. It can even help you catch bugs as yo... - [error-boundaries](error-boundaries.md): Validates usage of Error Boundaries instead of try/catch for errors in child components. - [Escape Hatches](escape-hatches.md): Some of your components may need to control and synchronize with systems outside of React. For example, you might nee... - [exhaustive-deps](exhaustive-deps.md): Validates that dependency arrays for React hooks contain all necessary dependencies. - [experimental_taintObjectReference](experimental-taintobjectreference.md): **This API is experimental and is not available in a stable version of React yet.** - [experimental_taintUniqueValue](experimental-taintuniquevalue.md): **This API is experimental and is not available in a stable version of React yet.** - [Extracting State Logic into a Reducer](extracting-state-logic-into-a-reducer.md): Components with many state updates spread across many event handlers can get overwhelming. For these cases, you can c... - [flushSync](flushsync.md): Using`flushSync`is uncommon and can hurt the performance of your app. - [
](form.md): The [built-in browser``component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) lets you cr... - [forwardRef](forwardref.md): In React 19,`forwardRef`is no longer necessary. Pass`ref`as a prop instead. - [ (<>...)](fragment.md): ``, often used via`<>...`syntax, lets you group elements without a wrapper node. - [gating](gating.md): Validates configuration of [gating mode](/reference/react-compiler/gating). - [globals](globals.md): Validates against assignment/mutation of globals during render, part of ensuring that [side effects must run outside ... - [Built-in React Hooks](hooks.md): *Hooks* let you use different React features from your components. You can either use the built-in Hooks or combine t... - [hydrateRoot](hydrateroot.md): `hydrateRoot`lets you display React components inside a browser DOM node whose HTML content was previously generated... - [immutability](immutability.md): Validates against mutating props, state, and other values that [are immutable](/reference/rules/components-and-hooks-... - [Importing and Exporting Components](importing-and-exporting-components.md): The magic of components lies in their reusability: you can create components that are composed of other components. B... - [incompatible-library](incompatible-library.md): Validates against usage of libraries which are incompatible with memoization (manual or automatic). - [Incremental Adoption](incremental-adoption.md): React Compiler can be adopted incrementally, allowing you to try it on specific parts of your codebase first. This gu... - [](input.md): The [built-in browser``component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) lets you ... - [Installation](installation.md): React has been designed from the start for gradual adoption. You can use as little or as much React as you need. Whet... - [Introduction](introduction.md): React Compiler is a new build-time tool that automatically optimizes your React app. It works with plain JavaScript, ... - [isValidElement](isvalidelement.md): `isValidElement`checks whether a value is a React element. - [JavaScript in JSX with Curly Braces](javascript-in-jsx-with-curly-braces.md): JSX lets you write HTML-like markup inside a JavaScript file, keeping rendering logic and content in the same place. ... - [Keeping Components Pure](keeping-components-pure.md): Some JavaScript functions are *pure.* Pure functions only perform a calculation and nothing more. By strictly only wr... - [lazy](lazy.md): `lazy`lets you defer loading component's code until it is rendered for the first time. - [Legacy React APIs](legacy-react-apis.md): These APIs are exported from the`react`package, but they are not recommended for use in newly written code. See the... - [Lifecycle of Reactive Effects](lifecycle-of-reactive-effects.md): Effects have a different lifecycle from components. Components may mount, update, or unmount. An Effect can only do t... - [Link](link.md): The [built-in browser``component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link) lets you us... - [logger](logger.md): The`logger`option provides custom logging for React Compiler events during compilation. - [Managing State](managing-state.md): As your application grows, it helps to be more intentional about how your state is organized and how the data flows b... - [Manipulating the DOM with Refs](manipulating-the-dom-with-refs.md): React automatically updates the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model/Introduction) ... - [memo](memo.md): `memo`lets you skip re-rendering a component when its props are unchanged. - [Meta](meta.md): The [built-in browser``component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta) lets you ad... - [