Using our custom Hooks

After creating our custom Hooks, we can now start using them throughout our blog application. Using custom Hooks is quite straightforward as they are similar to community Hooks. Just like all other Hooks, custom Hooks are simply JavaScript functions.

We created the following Hooks:

  • useTheme
  • useDispatch
  • usePostsState
  • useUserState
  • useDebouncedUndo
  • useAPILogin
  • useAPIRegister
  • useAPICreatePost
  • useAPIThemes

In this section, we are going to refactor our app to use all of our custom Hooks.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.204.208