I have a Next.js app that I'm deploying to vercel and am using ReactMarkDown component to render some content from a Strapi backend.
While this works locally, deployment fails with the following log:
49:54 Error: Do not pass children as props. Instead, nest children between the opening and closing tags. react/no-children-prop
<ReactMarkdown key={idx} children={content.answer} />
I assume that this is the culprit, it being unhappy with the use of "children" as a prop name, but... the ReactMarkDown component's prop to render content is... children.
I have tried this, with the following.
<ReactMarkdown >{content.answer}</ReactMarkdown>
<ReactMarkdown key={idx} children={[content.answer]} />
The first, doesn't change anything, the latter doesn't work, with the content no longer showing up.
Any suggestions greatly appreciated.