From f27304e34c13ac1cda4d48568ceea72aa3adc3bb Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 22 May 2021 04:36:08 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=20Remove=20unused=20hook=20useAsyn?= =?UTF-8?q?cEffect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nest_frontend/hooks/useAsyncEffect.js | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 nest_frontend/hooks/useAsyncEffect.js diff --git a/nest_frontend/hooks/useAsyncEffect.js b/nest_frontend/hooks/useAsyncEffect.js deleted file mode 100644 index 7595c3b..0000000 --- a/nest_frontend/hooks/useAsyncEffect.js +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-disable */ -import { useEffect } from "react" - - -/** - * {@link useEffect}, but with an async effect. - * - * @warning Breaks `react-hooks/exaustive-deps`. - * - * @param effect - The async effect. - * @param deps - The dependencies of the hook. - */ -export default function useAsyncEffect(effect, deps) { - useEffect(() => { - effect() - }, [effect, ...deps]) -}