Day 53

aronson(25)
Published in
#code
Words
105
Reading
1 min
9y
Listen to this post
~1 min

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!

Day 53 | Ecency