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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user