Initial checklist
Affected packages and versions
"react-markdown": "^9.0.0",
Link to runnable example
No response
Steps to reproduce
I have the following component that used to work fine:
<ReactMarkdown components={{
p: ({node, ...props}) => <Typography whiteSpace="pre-wrap" {...props} />,
code: ({node, inline, className, children, ...props}) => {
const match = /language-(\w+)/.exec(className || '')
return !inline && match
? <LazyCode content={String(children)} language={match[1]} />
: <code className={className} {...props}>{children}</code>
},
}}>{conversation.raw?.trim()}
</ReactMarkdown>
Now, I get the following errors:
- p.ref --> Type 'string' is not assignable to type '((instance: HTMLSpanElement | null) => void) | RefObject | null | undefined'.
- code.inline --> TS2339: Property 'inline' does not exist on type 'ClassAttributes & HTMLAttributes & ExtraProps'.
I'm using node@18.17.0 with next@13.5.4
Expected behavior
It used to work fine using the previous version
Actual behavior
The code does not compile
Runtime
Other (please specify in steps to reproduce)
Package manager
yarn 2
OS
Linux, macOS
Build and bundle tools
Next.js
Initial checklist
Affected packages and versions
"react-markdown": "^9.0.0",
Link to runnable example
No response
Steps to reproduce
I have the following component that used to work fine:
Now, I get the following errors:
I'm using node@18.17.0 with next@13.5.4
Expected behavior
It used to work fine using the previous version
Actual behavior
The code does not compile
Runtime
Other (please specify in steps to reproduce)
Package manager
yarn 2
OS
Linux, macOS
Build and bundle tools
Next.js