October 2019
Intermediate to advanced
426 pages
11h 49m
English
The final part of our theme feature is a component that can be used to change the theme dynamically, by making use of the State Hook that we defined earlier. The State Hook is going to re-render the App component, which will change the value that is passed to the ThemeContext.Provider, which, in turn, is going to re-render all the components that make use of the ThemeContext Context Hook.
Let's start implementing the ChangeTheme component:
import React from 'react'
Read now
Unlock full access