Welcome to this section of how we can use cases in React.
That is how we can style react component.
Before we continue, I have created fresh React projects and we are going to use this one as a playground
to explore some of the concepts that you are going to explore.
So let's do some housekeeping over here.
So let's go ahead and remove the IRC folder and let's start from scratch.
The reason being that I want to show you how you go by React application because we are just getting
started.
As soon as you become familiar with React, then you need to move this outside and recreate it again.
So let's go ahead and do that.
So let's create a Z folder and you may be thinking that, well, we may need two files.
Yes, you are right.
We may need the app.
App Dot G's file and then you also need the index dot JS file.
So for the app, you're going to be a simple component.
So let's go ahead and create a component, a function functional component cost app equal to my error
function and.
Riot component retains only react elements that JSX.
So let's go ahead and return some div with each one inside and let's say the app component.
So let's export this export default and then the app component.
So let's go ahead into the index and now let's require it react.
React.
From React and also required react.
Dom import react.
Dom Also from React.
Dome slash client.
And let's go ahead and create our element.
So cost route is equal to let's take the react dom and then create root.
And here we're going to select the DOM element, get element by ID and target the root elements.
So if you go to the public folder, this where we are selecting about a div.
All right, cool.
So next step is that on the root that we got, we have what is called render as a function.
Then you pass in our add component that you want to display.
So let's give it some h div here and now let's import the up component we did.
That is the up component and now let's mount it here ab and then slash.
So let's see if everything is running, how it has been loaded successfully.
Let's check our browser and we have the app component.
But because we are going to deal with I mean we are going to play around how to use CSS then this video.
Let's get started with a real logic for this section.