Module

Solid.Internal.View

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

Internal view runtime. JSX is a lazy description: each place it's rendered creates fresh DOM.

#JSX Source

data JSX

#Prop Source

data Prop :: Row Type -> Typedata Prop t0

A property for an element whose supported properties are r.

#ToBinding Source

class ToBinding v a | v -> a

v is either a or Accessor a, so class_ "btn" and class_ activeClass both type-check. The FFI tells them apart with typeof: attribute and text values are never functions.

Instances

#textJsx Source

#textBinding Source

textBinding :: forall v. ToBinding v String => v -> JSX

#fragment Source

#empty Source

#Namespace Source

newtype Namespace

#elementWith Source

elementWith :: forall r. Namespace -> String -> Array (Prop r) -> Array JSX -> JSX

#bindingProp Source

bindingProp :: forall r v a b. ToBinding v a => String -> (a -> b) -> v -> Prop r

convert is applied to the value, or to each value the accessor yields.

#eventProp Source

eventProp :: forall r e. String -> (e -> Effect Unit) -> Prop r

#refProp Source

refProp :: forall r. (Element -> Effect Unit) -> Prop r

Runs with the element before it's attached, without an owner, so it can't create reactive primitives.

#propsProp Source

propsProp :: forall r. Array (Prop r) -> Prop r

Several props as one.

#Realized Source

#realize Source

realize :: JSX -> Realized

Call inside an owner.

#ComponentRep Source

data ComponentRep t0

#componentRep Source

componentRep :: forall props. (props -> Effect JSX) -> ComponentRep props

#componentElement Source

componentElement :: forall props. Fn2 (ComponentRep props) props JSX

#propsComponentElement Source

propsComponentElement :: forall component r. Fn3 component (Array (Prop r)) (Array JSX) JSX

#JsPropEntry Source

data JsPropEntry

{ key, get } or { key, value }.

#jsPropsComponentElement Source

jsPropsComponentElement :: forall component. Fn2 component (Array JsPropEntry) JSX

#WhenValue Source

data WhenValue t0

Encoded so falsy values (Just false, Just 0, Just "") still count as present in Show / Match.

#whenValue Source

whenValue :: forall a. a -> WhenValue a

#showMaybeImpl Source

showMaybeImpl :: forall a v. Fn4 Boolean (Accessor (Nullable (WhenValue a))) JSX (v -> Effect JSX) JSX

keyed passes the value itself (re-created per value), otherwise an accessor.

#Keyed Source

data Keyed t0 t1 t2

How For matches items to views; item and index are what the render callback receives in that mode.

#keyedByIdentity Source

keyedByIdentity :: forall a. Keyed a a (Accessor Int)

#keyedByPosition Source

keyedByPosition :: forall a. Keyed a (Accessor a) Int

#keyedBy Source

keyedBy :: forall a k. (a -> k) -> Keyed a (Accessor a) (Accessor Int)

#forImpl Source

forImpl :: forall a item index. Fn4 (Keyed a item index) (Accessor (Array a)) JSX (item -> index -> Effect JSX) JSX

#matchMaybeImpl Source

#loadingImpl Source

#revealImpl Source

revealImpl :: forall options. Fn2 (Record options) (Array JSX) JSX

#dynamicImpl Source

dynamicImpl :: forall props. Fn2 (Accessor (ComponentRep props)) props JSX

#noHydrationImpl Source

#hydrationImpl Source

#provideImpl Source

provideImpl :: forall context a. Fn3 context a (Effect JSX) JSX

#LazyModule Source

data LazyModule

A module namespace from a dynamic import().

#LazyName Source

class LazyName :: Symbol -> Constraintclass LazyName name  where

The name of a lazily loaded module or value. It reaches the compiled call site as a "purs-solid:lazy:<name>" literal, which is how purs-solid/vite finds what to split into chunks.

Members

Instances

#lazyImpl Source

#clientOnlyImpl Source

#preloadImpl Source

preloadImpl :: forall props. EffectFn1 (ComponentRep props) Unit