It is risky and react did not build the specific subset of DOM, and probably that's why it is named as dangerouslySetInnerHTML
Though it is really needed as CMSes and Comment systems will give HTML string as output and building DOM nodes and then attaching them is very intensive task.
Though this package suggested by Naveen can help reduce the security risks with setting the HTML with dangerouslySetInnerHTML
I hope the explanation helped.
Pankaj Patel
Blog, Tech, Photography etc.
Nice. I didn't know about this package and seems like a good help in case of building apps which integrate with CMSes or user Data like Comments.
Thanks Naveen