From the course: React: Software Architecture
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Styling with server-side rendering
From the course: React: Software Architecture
Styling with server-side rendering
- [Instructor] All right, so now that we have our app set up for basic server side rendering, our server is basically taking care of rendering all of our React components. The next thing that we're going to take a look at is how to add styling. Now, this is actually not as trivial as it sounds, since the normal way of adding style to React components in a create React app application is using CSS modules. Now in order for CSS modules to work on the server side, when we're rendering it, that would involve us setting up web pack ourselves. And since I really would like to avoid that here, since it can be a little too in-depth and complicated for most people, I'm going to show you instead, two of my favorite ways for adding styles to server-side rendering. So the first thing which is the rather obvious way of going about it would be to open up the index.CSS file and simply add all the styles for your application inside of…
Contents
-
-
-
-
Server-side rendering basics3m 30s
-
(Locked)
Setting up a simple React app5m 12s
-
(Locked)
Basic React SSR6m 40s
-
(Locked)
Building and rendering an SSR React app2m 52s
-
(Locked)
Routing with server-side rendering7m 2s
-
(Locked)
Styling with server-side rendering7m 52s
-
(Locked)
Server-side rendering caveats2m 7s
-
-
-
-
-
-