The following component:
import React from 'react';
const container = ({ items }) => (
<div
dangerouslySetInnerHTML={{
__html: items,
}}
/>
);
export default container;
returns:
<div classname="myDiv"></div>
I'm trying to replace classname with class, but not sure how to do so.
I tried different ways for example this without any success:
<div
dangerouslySetInnerHTML={{
__html: items.replace('classname', 'class')
}}
/>
How can I replace the string inside the props?