/**
 * A convenience hook that will return the value of the input
 * from the previous render. You could consider this the class
 * component equivalent of `prevProps` from the life cycle
 * method: `componentDidUpdate`.
 *
 * Example:
 *
 * function myComponent(isVisible) {
 *  const [state, setState] = useState(initialState);
 *  const wasPreviouslyVisible = usePrevious(isVisible);
 *
 *  useEffect(() => {
 *    if (isVisible && !wasPreviouslyVisible) {
 *      setState(initialState);
 *    }
 *  }, [isVisible]);
 * }
 */
export default function usePrevious<T>(value: T, initialValue?: T | null): T | null;
