quantizor / markdown-to-jsx

🏭 The most lightweight, customizable React markdown component.
https://markdown-to-jsx.quantizor.dev/
MIT License
1.96k stars 169 forks source link

React 19 incompatibility #583

Open snowystinger opened 3 months ago

snowystinger commented 3 months ago

React has removed the JSX global namespace in React 19, as a result, it needs to be accessed via the React global namespace now React.JSX.

node_modules/markdown-to-jsx/dist/index.d.ts:122:17 - error TS2503: Cannot find namespace 'JSX'.

122 attrs?: JSX.IntrinsicAttributes;

Solution

Update references to JSX

Follow https://github.com/DefinitelyTyped/DefinitelyTyped/pull/69022 for how to install the pre-release of the types and if you can, use the codemod