Skip to content
masterclass Buddy

React Testing Library · Pipe

baseElement

In React Testing Library, baseElement is the DOM root used by queries returned from render. It defaults to document.body, or to the supplied container when container is provided.

Last updated

Syntax

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

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

Subscribe
  • render
  • container
  • baseElement
  • queries
  • rerender
  • unmount
  • asFragment

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