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 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy