Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Implement a custom Material-UI theme on the server using a Higher-order component

    reactReact
    ^16.0.0
    nextNext.js
    ^4.0.0

    In this lesson we’ll create a higher order component that will allow us to use Material-UI from within in a server-rendered environment. To do this, we will leverage Next.js’ getInitialProps lifecycle hook in order to avoid any issues with our styles rendering on both the client and server. This lesson will also show you how to get up and running with a custom Material UI theme!