Dsl

ff4s.Dsl
See theDsl companion object
class Dsl[F[_], State, Action]

Attributes

Companion
object
Source
Dsl.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Dsl[F, State, Action]

Members list

Type members

Classlikes

implicit class EventPropOps[Ev](prop: EventProp[Ev])

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
implicit class HtmlAttrsOps[A](attr: HtmlAttr[A])

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
implicit class HtmlPropOps[A, B](prop: HtmlProp[A, B])

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
implicit class HtmlTagOps(tag: HtmlTag[_])

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
object Modifier

Attributes

Companion
trait
Source
Dsl.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Modifier.type
sealed trait Modifier

Attributes

Companion
object
Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ChildNode
class ChildNodes
class DestroyHook
class EventHandler
class HtmlAttr[A]
class InsertHook
class Key
object NoOp.type
class Prop[A, B]
class Slot
class Style
class SvgAttr[A]
class Thunk
Show all
implicit class SlotOps(slot: Slot)

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
implicit class SvgAttrsOps[A](attr: SvgAttr[A])

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
implicit class SvgTagOps(tag: SvgTag[_])

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
implicit class VOps(view: V)

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
implicit class ViewOps[A](view: View[A])

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
implicit class WebComponentOps(wc: WebComponent)

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
object destroyHook

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Source
Dsl.scala
Supertypes
trait HtmlProps
trait HtmlAttrs
trait HtmlTags
class Object
trait Matchable
class Any
Show all
Self type
html.type
object insertHook

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
Self type
insertHook.type
object key

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
Self type
key.type
object svg extends SvgTags, SvgAttrs

Attributes

Source
Dsl.scala
Supertypes
trait SvgAttrs
trait SvgTags
class Object
trait Matchable
class Any
Self type
svg.type
object thunked

Thunks are currently broken :(

Thunks are currently broken :(

Attributes

Source
Dsl.scala
Supertypes
class Object
trait Matchable
class Any
Self type
thunked.type

Types

type V = View[VNode[F]]

Attributes

Source
Dsl.scala
type View[A] = Free[ViewA, A]

Attributes

Source
Dsl.scala

Value members

Concrete methods

def embed[A, StateB, ActionB](dslB: Dsl[F, StateB, ActionB], f: State => StateB, g: ActionB => Action)(view: View[A]): View[A]

Attributes

Source
Dsl.scala
def empty: V

Attributes

Source
Dsl.scala
def getId: View[Long]

Produces an increasing sequence of Ids: 1, 2, 3,...

Produces an increasing sequence of Ids: 1, 2, 3,... The advantage over getUUID is that the IDs are stable across renders provided the order of getId calls is stable. If global uniqueness is not required, this is better for performance.

Attributes

Source
Dsl.scala
def getState: View[State]

Produces the current state.

Produces the current state.

Attributes

Source
Dsl.scala
def getUUID: View[UUID]

Produces random UUIDs.

Produces random UUIDs. For uses cases see https://react.dev/reference/react/useId

Attributes

Source
Dsl.scala
def literal(html: String, cache: Boolean): V

Constructs a ff4s program from a HTML or SVG string.

Constructs a ff4s program from a HTML or SVG string. This is useful for things like SVG icons. Note that this methods is unsafe in the sense that there is no compile-time validation of the provided string. By default, the generated virtual DOM nodes are cached for performance. If you need to create a very large or even unbounded number of literals, then consider setting cache = false to avoid memory leaks.

Attributes

Source
Dsl.scala
def text(s: String): V

Attributes

Source
Dsl.scala
def useId[A](f: Long => View[A]): View[A]

Alias for getId.flatMap(f).

Alias for getId.flatMap(f).

Attributes

Source
Dsl.scala
def useState[A](f: State => View[A]): View[A]

Alias for getState.flatMap(f).

Alias for getState.flatMap(f).

Attributes

Source
Dsl.scala
def useUUID[A](f: UUID => View[A]): View[A]

Alias for getUUID.flatMap(f).

Alias for getUUID.flatMap(f).

Attributes

Source
Dsl.scala

Concrete fields

val noop: Modifier

This modifier does nothing.

This modifier does nothing. Can be useful in conditionals, e.g., option(if (someCondition) defaultSelected := true else noop)

Attributes

Source
Dsl.scala

Implicits

Implicits

final implicit def EventPropOps[Ev](prop: EventProp[Ev]): EventPropOps[Ev]

Attributes

Source
Dsl.scala
final implicit def HtmlAttrsOps[A](attr: HtmlAttr[A]): HtmlAttrsOps[A]

Attributes

Source
Dsl.scala
final implicit def HtmlPropOps[A, B](prop: HtmlProp[A, B]): HtmlPropOps[A, B]

Attributes

Source
Dsl.scala
final implicit def HtmlTagOps(tag: HtmlTag[_]): HtmlTagOps

Attributes

Source
Dsl.scala
final implicit def SlotOps(slot: Slot): SlotOps

Attributes

Source
Dsl.scala
final implicit def SvgAttrsOps[A](attr: SvgAttr[A]): SvgAttrsOps[A]

Attributes

Source
Dsl.scala
final implicit def SvgTagOps(tag: SvgTag[_]): SvgTagOps

Attributes

Source
Dsl.scala
final implicit def VOps(view: V): VOps

Attributes

Source
Dsl.scala
final implicit def ViewOps[A](view: View[A]): ViewOps[A]

Attributes

Source
Dsl.scala
final implicit def WebComponentOps(wc: WebComponent): WebComponentOps

Attributes

Source
Dsl.scala