Module
Yoga.React.Om
- Package
- purescript-yoga-react-om
- Repository
- rowtype-yoga/purescript-yoga-react-om
#OmRender Source
newtype OmRender :: Row Type -> Type -> Type -> Type -> Typenewtype OmRender ctx x y a
A render context that tracks the Om context at the type level.
At runtime this is identical to Render — the ctx is phantom.
Use qualified-do with this module (e.g. Om.do) to compose hooks.
Instances
Newtype (OmRender ctx x y a) _IxFunctor (OmRender ctx)IxApply (OmRender ctx)IxApplicative (OmRender ctx)IxBind (OmRender ctx)IxMonad (OmRender ctx)Functor (OmRender ctx x y)(TypeEquals x y) => Apply (OmRender ctx x y)(TypeEquals x y) => Applicative (OmRender ctx x y)(TypeEquals x y) => Bind (OmRender ctx x y)(TypeEquals x y) => Monad (OmRender ctx x y)(TypeEquals x y, Semigroup a) => Semigroup (OmRender ctx x y a)(TypeEquals x y, Monoid a) => Monoid (OmRender ctx x y a)
#omComponent Source
omComponent :: forall @ctx @err hooks props. String -> (props -> OmRender ctx Unit hooks JSX) -> Om (Record ctx) err (props -> JSX)Create a React component with Om-based dependency injection.
The context is captured once at construction time and made available
to hooks via useCtx and useOm inside qualified-do blocks.
#liftRender Source
liftRender :: forall ctx x y a. Render x y a -> OmRender ctx x y aLift a standard React hook into OmRender.
#useLayoutEffect Source
useLayoutEffect :: forall ctx deps hooks. Eq deps => deps -> Effect (Effect Unit) -> OmRender ctx hooks (UseLayoutEffect deps hooks) Unit#useLayoutEffectOnce Source
useLayoutEffectOnce :: forall ctx hooks. Effect (Effect Unit) -> OmRender ctx hooks (UseLayoutEffect Unit hooks) Unit#useLayoutEffectAlways Source
useLayoutEffectAlways :: forall ctx hooks. Effect (Effect Unit) -> OmRender ctx hooks (UseLayoutEffect Unit hooks) Unit#useReducer Source
useReducer :: forall ctx state action hooks. state -> Reducer state action -> OmRender ctx hooks (UseReducer state action hooks) (state /\ (action -> Effect Unit))#useTransition Source
useTransition :: forall ctx hooks. OmRender ctx hooks (UseTransition hooks) (Boolean /\ ((Effect Unit) -> Effect Unit))#useDeferredValue Source
useDeferredValue :: forall ctx a hooks. a -> OmRender ctx hooks (UseDeferredValue a hooks) aRe-exports from React.Basic.Hooks
#UseTransition Source
data UseTransition t0#UseReducer Source
data UseReducer t0 t1 t2#UseLayoutEffect Source
data UseLayoutEffect t0 t1#UseDeferredValue Source
data UseDeferredValue t0 t1- Modules
- Yoga.
React. Om - Yoga.
React. Om. Signal