From 1642393e1950c8c5e7cf392642bf53184ac52cd3 Mon Sep 17 00:00:00 2001 From: Dustin Whitney Date: Mon, 8 Jul 2019 11:23:57 -0400 Subject: [PATCH] some docs for useEffect --- src/React/Basic/Hooks.purs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/React/Basic/Hooks.purs b/src/React/Basic/Hooks.purs index 08cea0f..eba4b0a 100644 --- a/src/React/Basic/Hooks.purs +++ b/src/React/Basic/Hooks.purs @@ -113,6 +113,8 @@ useState initialState = Render do foreign import data UseEffect :: Type -> Type -> Type +-- | The effect will be run when the component is mounted, and the effect +-- | returned from the function will be run on cleanup useEffect :: forall key . Eq key @@ -367,4 +369,4 @@ foreign import useEqCache_ . EffectFn2 (Fn2 a a Boolean) a - a \ No newline at end of file + a