Module

Jelly.Hydrate

Package
purescript-jelly
Repository
yukikurage/purescript-jelly

#HydrateM Source

newtype HydrateM :: (Type -> Type) -> Type -> Typenewtype HydrateM m a

Monad for hydrating a component. Ref (Maybe Node) is used to store the existing DOM node. Signal (Array Node) are result nodes.

Constructors

Instances

#hydrate Source

hydrate :: forall m. MonadHooks m => MonadRec m => Component m -> Node -> m Unit

Hydrate a component into a DOM node. Nodes must be in the same order as the component.

#mount Source

mount :: forall m. MonadHooks m => MonadRec m => Component m -> Node -> m Unit

Mount a component into a DOM node. Existing nodes will be removed.