DEV Community

Discussion on: How I redid the DEV badge using Font Awesome [updated]

Collapse
 
themindfuldev profile image
Tiago Romero Garcia

Hi @codevault , the traditional approach of defining styles is simply not supported in JSX. The official reason is: this is consistent with the DOM style JavaScript property, is more efficient, and prevents XSS security holes.

So the external pair of curly braces is to indicate this is going to be read from a JSX variable, and the internal pair of curly braces is because it's a JS object.

Source: reactjs.org/docs/dom-elements.html...