I'm making a react application that has a blogging function and I need it to properly display my HTML content stored in my javascript object. This is what I mean:
const blog = {
name: "post1",
content: "<p>This is my first blog post</p>",
}
I have an object that stores the blog content and when I make a reference to the object I need it to render properly in the DOM as a paragraph, but instead, it renders with the tags displaying in react, please how do i fix it and make the content render as a DOM element
This is my first blog post
)`. This will be transpiled into a JS object (the output of `React.createElement`), rather than the string you now have. – Robin Zigmond Jun 03 '20 at 20:10