Support for React Server Components
Author: remy90Created May 9, 2023Updated Jul 30, 2026
Labelsenhancementneeds investigation
Describe the feature you'd like:
As a user of react 18 with NextJS (with app directory), I would like to render async server components
example: // Page.tsx
const Page = async ({ params, searchParams }: PageProps) => {
const asyncData = await fetchSomeDataAsynchronously()
return (<foo {...asyncData} />
}... // Page.test.tsx
it('should render', () => {
render(<Page />)
expect(screen....).ToBe(....)
})Extracting server page logic would be an alternative, but I think that would also significantly reduce the purpose of RTL if that were to become an encouraged architectural default.
Current progress, workarounds, and demo
Source: testing-library/react-testing-library