Results-driven Software Engineer and Technical Writer with four years of combined experience in designing, developing, and optimizing web applications and crafting technical articles.
Awesome article.
I think it's also great for React beginners.
Can you briefly explain what <p dangerouslySetInnerHTML={{ __html: item.description }}></p> does?
most especially the dangerouslySetInnerHTML
I'm glad you liked my article. So the dangerouslySetInnerHTML element is used to replace inner HTML in the browser DOM. It comes in handy when you have response data from an API that also has HTML tags attached to it. I hope this answers your question. You can read more about it here:
Awesome article.
I think it's also great for React beginners.
Can you briefly explain what
<p dangerouslySetInnerHTML={{ __html: item.description }}></p>
does?most especially the
dangerouslySetInnerHTML
Thanks
Hi Umoren,
I'm glad you liked my article. So the dangerouslySetInnerHTML element is used to replace inner HTML in the browser DOM. It comes in handy when you have response data from an API that also has HTML tags attached to it. I hope this answers your question. You can read more about it here:
reactjs.org/docs/dom-elements.html...