Module

Panda.HTML.Watchers

Package
purescript-panda
Repository
i-am-tom/purescript-panda

#renderAlways Source

renderAlways :: forall event state update eff. ({ state :: state, update :: update } -> Component eff update state event) -> Children eff update state event

Regardless of the update, re-render this child. NB that this is probably a bad idea within a larger application, as it will probably equate to a lot of unnecessary re-render. Consider embedding such an element within a delegate and filtering updates to improve performance.

#renderAlways' Source

renderAlways' :: forall event state update eff. (state -> Component eff update state event) -> Children eff update state event

Regardless of the update, re-render with no interest in what the update was. Again, this will be a real performance-killer in larger applications, so use it with caution. Beyond very simple cases, it's usually a sign that something needs rethinking.

#renderMaybe Source

renderMaybe :: forall value event state update eff. ({ state :: state, update :: update } -> Maybe value) -> (value -> Component eff update state event) -> Children eff update state event

Given an update and state, maybe produce a value. If a value is produced, use this value to render a component. As with the other render methods, this will trigger a full re-render.