From bfa3b70644e27714017907c80951b6e3584a2f58 Mon Sep 17 00:00:00 2001 From: Depickere Sven Date: Mon, 24 Jan 2022 17:25:35 +0100 Subject: [PATCH] refactor(): Remove function, use it implicit --- demo/components/FileInput.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/demo/components/FileInput.tsx b/demo/components/FileInput.tsx index 2f06cd8d..2192a826 100644 --- a/demo/components/FileInput.tsx +++ b/demo/components/FileInput.tsx @@ -23,12 +23,8 @@ const Button = styled.button` } `; -function GetUseRef(): RefObject { - return useRef(null); -} - const FileInput = props => { - const hiddenFileInput: RefObject = GetUseRef(); + const hiddenFileInput: RefObject = useRef(null); function handleClick() { if (hiddenFileInput && hiddenFileInput.current) {