My CMS outputs a string of data attributes to add to an element I wanted to know how I can add the string of attributes to an element in React
This sample code does not appear to work.
function HelloWorld(props) {
const fromCMS = `data-target="h1" data-content="Hello World"`;
return (
<h1 {fromCMS}>{props.content}</h1>
)
}