Open
Description
Hello, I'm using react-html-parser with Next.js. I tried converting an HTML string to actual HTML. I got error instead.
What could be wrong?
import dynamic from "next/dynamic";
const ReactHtmlParser = dynamic(
() => {
return import('react-html-parser');
},
{ ssr: false }
);
export default function Profile({ profileData }) {
const ExtendedProfileShow = [
profileData.businessInfo.extendedProfile.map((showExtendedProfile) =>
<div key={showExtendedProfile.title}> {showExtendedProfile.title} <br/>
{showExtendedProfile.info}
</div>)
];
return (
<div>
{ReactHtmlParser(ExtendedProfileShow)}
</div>
);
}
Metadata
Metadata
Assignees
Labels
No labels