Solid.Signal
- Package
- purescript-purs-solid
- Repository
- arazorda/purs-solid
Signals: the writable sources of the reactive graph. map / do on an
Accessor build derived accessors that recompute when read (cache them
with Solid.Reactivity.createMemo). Writes are batched until the next flush.
Values that may not have loaded yet are Async instead, and can't be read
directly.
#SignalOptions Source
type SignalOptions :: Type -> Row Typetype SignalOptions a = (equals :: Equality a, name :: String, ownedWrite :: Boolean, unobserved :: Effect Unit)
#createSignal Source
createSignal :: forall m a. MonadReactive m => a -> m (Signal a)Works in Effect or Setup; signals need no disposal.
#createSignalWith Source
createSignalWith :: forall m a given missing. MonadReactive m => Union given missing (SignalOptions a) => Record given -> a -> m (Signal a)Takes any subset of SignalOptions.
Re-exports from Solid.Internal.Equality
#Equality Source
data Equality t0When a new value counts as a change: Solid's equals option. Leaving it
out means reference equality (===), so a freshly built record or array
always counts as a change.
#eqEquality Source
eqEquality :: forall a. Eq a => Equality aStructural equality via Eq: rebuilding an equal value doesn't notify.
#customEquals Source
customEquals :: forall a. (a -> a -> Boolean) -> Equality atrue means "equal, don't notify".
#alwaysNotify Source
alwaysNotify :: forall a. Equality aEvery write notifies, even of the same value.
Re-exports from Solid.Internal.Tracked
#Async Source
data Async t0A reactive value that may not have loaded yet. It can't be read directly
(get, sample): render it, derive from it, or wait for it with
Solid.Async.resolve.
Instances
Tracked AsyncFunctor AsyncApply AsyncApplicative AsyncBind AsyncMonad Async(Semigroup a) => Semigroup (Async a)(Monoid a) => Monoid (Async a)(HeytingAlgebra a) => HeytingAlgebra (Async a)(BooleanAlgebra a) => BooleanAlgebra (Async a)
#Accessor Source
data Accessor t0A reactive value: read inside a tracked computation, it subscribes it.
Instances
Tracked AccessorFunctor AccessorApply AccessorApplicative AccessorBind AccessorMonad Accessor(Semigroup a) => Semigroup (Accessor a)(Monoid a) => Monoid (Accessor a)(HeytingAlgebra a) => HeytingAlgebra (Accessor a)(BooleanAlgebra a) => BooleanAlgebra (Accessor a)
- Modules
- Solid.
Action - Solid.
Async - Solid.
Component - Solid.
Component. JS - Solid.
Context - Solid.
Control - Solid.
DOM - Solid.
DOM. Aria - Solid.
DOM. AttrValue - Solid.
DOM. HTML - Solid.
DOM. SVG - Solid.
Errors - Solid.
Internal. Action - Solid.
Internal. Equality - Solid.
Internal. Identity - Solid.
Internal. Names - Solid.
Internal. Optimistic - Solid.
Internal. Props - Solid.
Internal. Reply - Solid.
Internal. Serializable - Solid.
Internal. ServerFunction - Solid.
Internal. Setup - Solid.
Internal. Store - Solid.
Internal. Tracked - Solid.
Internal. View - Solid.
JSX - Solid.
Lifecycle - Solid.
Meta - Solid.
Owner - Solid.
Reactivity - Solid.
Root - Solid.
Router - Solid.
Router. Action - Solid.
Router. Path - Solid.
Router. Query - Solid.
Router. Search - Solid.
Setup - Solid.
Signal - Solid.
Start. Middleware - Solid.
Start. RequestEvent - Solid.
Start. Response - Solid.
Start. ServerFunction - Solid.
Start. UseServer - Solid.
Store - Solid.
Testing - Solid.
Utility - Solid.
Web - Solid.
Web. SSR