From 7c8510439bb1c357bd026cd16daab23cc382b50a Mon Sep 17 00:00:00 2001 From: Kirill Kuznetsov Date: Thu, 11 Apr 2024 10:54:10 +0300 Subject: [PATCH 1/2] Simplify isExpired (#73) --- src/React/Basic/Hooks/Suspense/Store.purs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/React/Basic/Hooks/Suspense/Store.purs b/src/React/Basic/Hooks/Suspense/Store.purs index 0c38260..dbb236b 100644 --- a/src/React/Basic/Hooks/Suspense/Store.purs +++ b/src/React/Basic/Hooks/Suspense/Store.purs @@ -38,7 +38,7 @@ mkSuspenseStore :: mkSuspenseStore defaultMaxAge backend = do ref <- Ref.new Map.empty let - isExpired maxAge now' (_ /\ d) = unInstant now' < unInstant d <> maxAge + isExpired maxAge now' (_ /\ savedTime) = unInstant savedTime <> maxAge < unInstant now' pruneCache = do case defaultMaxAge of From be0133c2c1f4fa575a5e886a0fb24f3691dde08e Mon Sep 17 00:00:00 2001 From: Alex Mouton Date: Tue, 1 Oct 2024 14:51:36 -0700 Subject: [PATCH 2/2] Fix HookApply example (#75) --- src/React/Basic/Hooks/Internal.purs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/React/Basic/Hooks/Internal.purs b/src/React/Basic/Hooks/Internal.purs index b3f30aa..f502ff7 100644 --- a/src/React/Basic/Hooks/Internal.purs +++ b/src/React/Basic/Hooks/Internal.purs @@ -191,6 +191,6 @@ type HookApply hooks (newHook :: Type -> Type) --| order they appear when actually used in do-notation. --| ```purescript --| type UseCustomHook hooks = UseEffect String (UseState Int hooks) ---| type UseCustomHook' = UseState Int & UseEffect String +--| type UseCustomHook' hooks = hooks & UseState Int & UseEffect String --| ``` infixl 0 type HookApply as & \ No newline at end of file