-
Notifications
You must be signed in to change notification settings - Fork 50.1k
Open
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug
Description
A Server Component that renders <Context> directly will result in a runtime error:
Element type is invalid. Received a promise that resolves to: Context. Lazy element type must resolve to a class or function.
import { Context } from './context';
export default function Home() {
return <Context value={2}>hello</Context>;
}// context.tsx
'use client';
import { createContext } from 'react';
export const Context = createContext(1);React version: 19.3.0-canary-378973b3-20251205
Link to code example:
https://github.com/samselikoff/2025-12-09-render-context-from-rsc
The current behavior
Renders without error
The expected behavior
Errors with
Element type is invalid. Received a promise that resolves to: Context. Lazy element type must resolve to a class or function.
Metadata
Metadata
Assignees
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug