I'm not saying that's how it should be done. I'm just clarifying what the author of the article was referring to.
The entire documentation block for that is prefixed with a big yellow-box warning:
> using the style attribute as the primary means of styling elements is generally not recommended.
And then it links to https://reactjs.org/docs/faq-styling.html which just says over and over again "use class names"