October 2019
Intermediate to advanced
426 pages
11h 49m
English
Instead of using the useContext Hook with the ThemeContext, we can now use the useTheme Hook directly! If we end up changing the theming system later on, we can simply modify the useTheme Hook and our new system will be implemented throughout our application.
Let's refactor our app to use the useTheme Hook:
import { useTheme } from './hooks'
const { primaryColor } = useTheme()
import { useTheme } from './hooks'
Read now
Unlock full access