Module

Solid.Setup

Package
purescript-purs-solid
Repository
arazorda/purs-solid

Setup is the monad for code that runs inside a reactive owner. It has no MonadEffect, so writing signals or reading untracked during setup doesn't compile. Effect code enters it through createRoot or runWithOwner.

#liftSetup Source

liftSetup :: forall a. Effect a -> Setup a

Runs an arbitrary effect during setup, e.g. Ref.new. The effect must not write signals or stores; the types can't tell, but Solid's dev build reports such a write (REACTIVE_WRITE_IN_OWNED_SCOPE).

Re-exports from Solid.Internal.Setup

#Setup Source

newtype Setup a

Code that runs inside a reactive owner: a component body, a createRoot body, a list-item mapper.

Instances

#MonadReactive Source

class MonadReactive :: (Type -> Type) -> Constraintclass (Monad m) <= MonadReactive m 

Monads that may create signals and roots: Effect (unowned) and Setup (owned).

Instances