chore: Remove react-keydown (#2713)

* First steps of remove react-keydown, replace with hook

* RegisterKeyDown component to aid transition away from react-keydown
This commit is contained in:
Tom Moor
2021-11-01 19:52:04 -07:00
committed by GitHub
parent 5f00e1394d
commit 57fa1305a6
11 changed files with 220 additions and 565 deletions

View File

@@ -1,7 +1,7 @@
// @flow
import * as React from "react";
export default function usePrevious(value: any) {
export default function usePrevious<T>(value: T): T | void {
const ref = React.useRef();
React.useEffect(() => {
ref.current = value;