- [Instructor] Let's do a demonstration now…of using essential selectors and styles.…Let's go ahead and take a look at some basic…simple selectors, as well as do some basic styling.…So we have our demo component here,…and what I'm going to do is I'm actually going to…wrap this in react dot fragment, there we go.…Then I'm going to take this div and pop this in there like now.…And we're just going to have a couple of different divs.…
We'll have that div, and then we'll give a class name…on this one.…Whenever you set a class in react JSX,…you have to call it class name instead of class,…and we'll just call this info.…And then I'm going to change the ID of this one…to be message.…And we'll keep our text the same in all three cases,…doesn't matter what the actual content is.…But we're going to style these differently…based upon different selectors.…So up here in our demo CSS,…right now all of the text should be red,…actually let's change that to blue,…I like blue better, there we go.…
And I'm going to stop our production version.…
Share this video
Embed this video
Video: Demo: Selectors and styles in action