From aa5d40a6253b6cf003fd2f4efe461dd99f1a020d Mon Sep 17 00:00:00 2001 From: Ryan Trinkle Date: Tue, 4 Jul 2023 12:49:48 -0400 Subject: [PATCH] Delete unsupported hooks --- src/React/Hook.hs | 48 ----------------------------------------------- 1 file changed, 48 deletions(-) diff --git a/src/React/Hook.hs b/src/React/Hook.hs index fbc98e7..c59a1de 100644 --- a/src/React/Hook.hs +++ b/src/React/Hook.hs @@ -68,51 +68,3 @@ useCallback f deps = Hook $ do depsArray <- lift $ toJSVal =<< sequence someDeps pure [depsArray] lift $ (react # t "useCallback") $ [pToJSVal cb] <> depsArg - --------------------------------------------------------------------------------- --- Not yet supported --------------------------------------------------------------------------------- - -type DispatchFunction a = a -> Effect () - -type Reducer s a = s -> a -> s - -useContext :: Context a -> Hook a -useContext = undefined - -data Context a - -createContext :: a -> IO (Context a) -createContext = undefined - -provider :: Context a -> a -> Render b -> Render b -provider = undefined - -data Ref a - -forwardRef :: (props -> Ref refVal -> Hook (Render ())) -> Component props refVal -forwardRef = undefined - -useImperativeHandle :: Ref a -> Effect a -> Maybe [JSVal] -> Hook () -useImperativeHandle = undefined - -useReducer :: Reducer s a -> a -> Maybe (a -> a) -> Hook (a, DispatchFunction a) -useReducer = undefined - -useTransition :: Hook (Bool, Effect () -> Effect ()) -useTransition = undefined - -useDeferredValue :: a -> Hook a -useDeferredValue = undefined - -useDebugValue :: a -> Maybe (a -> b) -> Hook () -useDebugValue = undefined - -useId :: Hook Text -useId = undefined - -useSyncExternalStore :: (IO () -> IO (IO ())) -> IO a -> Maybe (IO a) -> Hook () -useSyncExternalStore = undefined - -newtype Effect a = Effect { unEffect :: JSM a } - deriving (Functor, Applicative, Monad)