From the course: Build Modern Web Apps with React, Hooks, State Management, and APIs Using Vite or Next.js

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Theme context: Implementing the provider

Theme context: Implementing the provider

Welcome back. In the previous video, we discussed about creating the theme context and theme provider along with a header component. Then we discussed a theme switcher component which will allow us to use the context value and then we are going to provide that value to switch our theme. We are going to use Tailwind CSS in our existing hoax application because we are understanding hoax and all the hoax example can go in one place. So on the whole, we are going to have following items to be done. For this, we are going to do the following items. The first one is using the existing hoax application. Then we are going to install Tailwind CSS in that application and make it functional. After that, we are going to create our theme context. We'll create that context and using the theme provider, we are going to wrap our components inside it. Then we create a header component. And lastly, we are going to have a theme switcher, which is actually going to switch the theme for us. Let's get to…

Contents