Skip to content
masterclass Buddy

React Testing Library · Function

prettyDOM

render mounts a React element into a container attached to document.body. It returns queries and helpers for inspecting, updating, unmounting, and comparing the rendered output.

Last updated

Syntax

function render(ui: React.ReactElement<any>, options?: RenderOptions): RenderResult

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • screen.debug
  • prettyDOM
  • rerender
  • unmount
  • asFragment
  • cleanup
  • renderHook
  • configure

Source: API | Testing Library. Checked 2026-11-03.