October 2019
Intermediate to advanced
426 pages
11h 49m
English
We are now going to create a slightly more advanced Hook for debounced undo functionality. We already implemented this functionality in the CreatePost component. Now, we are going to extract this functionality into a custom useDebouncedUndo Hook.
Let's create the useDebouncedUndo Hook with the following steps:
import { useState, useEffect, useCallback } from 'react'import useUndo from 'use-undo'import { useDebouncedCallback } from 'use-debounce'
Read now
Unlock full access