Day 53

in code •  7 years ago 

March 7th, 2018

Hello! At the React course by Wes Bos I learned about CSS in React.
We have import the CSS directly in a component and that will go together with the component

How to import it to the index.js

     import './css/style.css';

I also created app layout with components. It will hold all the children.

     div className="catch-of-the-day"
             div className="menu"
                Header /
            div
            Order /
            Inventory /
        div

We can just add the tags with an "/" and react will import it automatically. Of course it has to be in the same file, path.

    class Order extends React.Component

Example beginning for the "Order" component.

Cheers!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!