How to install and use Emotion in a Gatsby project.
Emotion is a CSS library that focuses on composition of styles.
Gatsby is a progressive web app generator commonly used to build marketing, blog, and ecommerce sites.
Instructor: First, we'll initialize a new Gatsby project with the default boilerplate. Then, we'll install Emotion Core and the Gatsby Emotion plugin. Now, we can open the gatsby-config.js and add our Emotion plugin.
Next, we can start our Gatsby with yarn develop. We'll take the URL it gave us and put it into our browser. Next, we can go into our source folder and pages and open the index.js file. We're going to add some styles to the h1 tag.
That's it. You've used Emotion for the first time.
You must be a Pro Member to view code
Access all courses and lessons, track your progress, gain confidence and expertise.