Skip to content

Type 'import(".../node_modules/.pnpm/@[email protected]/node_modules/@types/react/jsx-runtime").JSX.Element' is not assignable to type 'JSX.Element'. #231

@winstonpurnomo

Description

@winstonpurnomo

Trying to do this code:

<Mosaic
        renderTile={(id: string, path) => (
          <MosaicWindow path={path} title={`Window ${id}`}>
            <h1>Hello {id}!</h1>
          </MosaicWindow>
        )}
        initialValue={{
          direction: "row",
          first: "a",
          second: "b",
        }}
      />

With react and react-dom version 19.1.0 and

"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",

I get the error:

Type 'import(".../node_modules/.pnpm/@[email protected]/node_modules/@types/react/jsx-runtime").JSX.Element' is not assignable to type 'JSX.Element'

Is this because React 19 is not supported yet? is there a workaround?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions