Skip to content

How to add inline styles in react?

I’m new to react. I’ve tried {{style=color: "red"}} but this gives me an error. Appreciate if you can help me.

Answer

It’s easy to add inline styles in react. style={{color: "red"}} this is how you do it.