Skip to content
masterclass Buddy

React Testing Library · Function

render

render mounts a React element for testing and returns bound queries plus helpers. It uses a container attached to document.body by default.

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
  • rerender
  • unmount
  • asFragment
  • cleanup
  • renderHook
  • configure
  • queries

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