3 ms·
How do I change the background color of the HTML page? Install a library
- orange8 6y agoThis is what happens when you learn React first, without a basic understanding of web fundamentals (HTML, CSS and JS)
- forbiddenvoid 6y agoI'm trying really, really hard to understand how this is even possible and coming up empty. Obviously, there is a ton of evidence in the responses on that page that indicates that this is happening, but I don't understand it.
- motogpjimbo 6y agoAn interesting question to ask yourself is how many of the thought leaders in our community (including here on HN) who vociferously denounce DOM-based development at every opportunity have never written a native HTML5 application.
- robrtsql 6y agoNobody is recommending that this user installs a library. This user has already installed and is using React, and the top answer shows how to change the background color using style, which is not a React-specific concept, both with vanilla Javascript and with React. I don't see a problem here.
- shaftway 6y ago> React Helmet (https://github.com/nfl/react-helmet https://github.com/nfl/react-helmet) > I really found this library very helpfull. Really clean solution i would say. > Sample Usage: import Helmet from 'react-helmet'; <Helmet bodyAttributes={{style: 'background-color : #fff'}}/> > answered Aug 9 '17 at 10:37 > Rahul
- robrtsql 6y agoOh. My bad. Thanks for pointing that out.