Hacker News new | past | comments | ask | show | jobs | submit login

Not exactly. If you are putting something inside the tag in React, you are implitly setting inner HTML the React way, managed by the virtual DOM.

This method (actually not even a method but an attribute that probably calls a method if set) "bypasses" React to set the inner HTML of the element, hence "dangerous".

(But I get what you mean of course, the reply was not to you but anyone who isn't familiar with React)




You’re right it’s not even a method lol it’s a custom dom attribute. I had no idea




The deadline for YC's W25 batch is 8pm PT tonight. Go for it!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: