markdown-to-jsx icon indicating copy to clipboard operation
markdown-to-jsx copied to clipboard

Not compatible with React 18

Open tolokoban opened this issue 3 years ago • 3 comments

First of all, I love this package! It works fine with React 17.0.2, but cannot compile with React 18.0.0

We get this error message:

node_modules/markdown-to-jsx/dist/index.d.ts:53:73 - error TS2694: Namespace 'React' has no exported member 'Props'.

53         createElement: (tag: Parameters<CreateElement>[0], props: React.Props<any>, ...children: React.ReactChild[]) => JSX.Element;
                                                                           ~~~~~

tolokoban avatar Apr 23 '22 09:04 tolokoban

Quick bandaid to get around the build error is to add "skipLibCheck": true to your tsconfig

Chris112 avatar Jul 11 '22 07:07 Chris112

Good to know. Thanks!

tolokoban avatar Jul 12 '22 08:07 tolokoban

Oh hmm, I guess they must have changed the types. We can fix it for v8

quantizor avatar Jan 31 '23 03:01 quantizor