October 2019
Intermediate to advanced
426 pages
11h 49m
English
First, we are going to adjust the ChangeTheme component and replace the Resource Hook, accessing /themes with our custom useAPIThemes Hook in the following steps:
import { useResource } from 'react-request-hook'
Replace it with our custom useAPIThemes Hook:
import { useAPIThemes } from './hooks'
const [ themes, getThemes ] = useAPIThemes()
Now the ChangeTheme component uses our custom API Hook to pull themes from the API.
Read now
Unlock full access