IssueRaiser

Support for React Server Components

<!-- Vote on feature requests by adding a 👍. This helps maintainers prioritize what to work on. --> ### 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 ```typescript const Page = async ({ params, searchParams }: PageProps) => { const asyncData = await fetchSomeDataAsynchronously() return (<foo {...asyncData} /> } ``` ... // Page.test.tsx ```typescript 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](#issuecomment-1569813305)

Posted by remy90 on May 9, 2023, 2:57 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,500 issues0 comments

support (SaaS)

Support for React Server Components

remy90May 9, 2023, 2:57 PM

<!-- Vote on feature requests by adding a 👍. This helps maintainers prioritize what to work on. --> ### 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 ```typescript const Page = async ({ params, searchParams }: PageProps) => { const asyncData = await fetchSomeDataAsynchronously() return (<foo {...asyncData} /> } ``` ... // Page.test.tsx ```typescript 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](#issuecomment-1569813305)

Comments (0)

No comments yet. Start the discussion.

Comment on this issue