From the course: React for Web Designers

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

React and CSS: A special relationship

React and CSS: A special relationship - React.js Tutorial

From the course: React for Web Designers

React and CSS: A special relationship

- [Instructor] Before I started working with React, one of the things I had heard about was the weird, to me, way that people worked with CSS. So let's talk about the special relationship between React and CSS. Right off the top, know that you don't have to change the way you work with CSS, especially if you're integrating React into an existing code base, the way we're doing in this course. You can still create classes on your components and style them in CSS files. That still works just fine, and indeed, that's how we'll be working, because we're starting with static-styled mock ups. On relatively small projects, you're unlikely to run into any problems with this approach. One of the principles that drives how React is built is separation of concerns. You might think, of course, that's why my HTML, CSS, and JavaScript are all separate, and I put them in separate files. But that's not the same thing. That's more like separation of technologies. On large projects like, say, Facebook…

Contents