DEV Community

Arefin
Arefin

Posted on

Css is Not Rendering On React App

Hi , I am learning React Js from it's official docs . As the official docs says , the CSS code , the square box for tic tac toe is not rendering on localhost frontend although I have put the CSS code in that file properly.

Image description

Image description

Discussion (2)

Collapse
andrewbaisden profile image
Andrew Baisden

It's hard to tell from that one screenshot. Getting the CSS to work in a React app is pretty straightforward. If you use create-react-app and setup the default boilerplate it already has the css hooked up and working. So if you do that you should be able to figure it out.

You just need to import the CSS file correctly from the right folder.

Collapse
ivanjeremic profile image
Ivan Jeremic • Edited on

In your main entry file where your render is just do import "./index.css"