package bonsai

  1. Overview
  2. Docs
A library for building dynamic webapps, using Js_of_ocaml

Install

Dune Dependency

Authors

Maintainers

Sources

bonsai-v0.14.0.tar.gz
sha256=43f35d648644492d776bf2c7b86c8227e7793615b6a658432e95f8dccd3631f8
md5=b5e743dbfa64d0da5fd660f14cd0b549

doc/bonsai.web/Bonsai_web/Bonsai/With_incr/index.html

Module Bonsai.With_incr

val of_incr : 'result Incr.t -> (_, 'result) t

Constructs a bonsai component whose result is always the same as its input Incremental node.

val pure : f:('input Incr.t -> 'result Incr.t) -> ('input, 'result) t

Same as Bonsai.pure but allows the user to optimize using Incremental.

val model_cutoff : ('input, 'result) t -> ('input, 'result) t

Creates a bonsai component where the given cutoff is applied to the incremental node for the component's model, preventing a component from being recalculated unnecessarily.

See Incr.set_cutoff.

val value_cutoff : cutoff:'input Incremental.Cutoff.t -> ('input, 'input) t

Creates a bonsai component where the given cutoff is applied to the incremental node as input passes through the component, preventing a component from being recalculated unnecessarily.

See Incr.set_cutoff.

val map : ('input, 'r1) t -> f:('r1 Incr.t -> 'r2 Incr.t) -> ('input, 'r2) t

Transforms the result of a component, exposing the incrementality for optimization purposes.

val map_input : ('i2, 'result) t -> f:('i1 Incr.t -> 'i2 Incr.t) -> ('i1, 'result) t

Transforms the input of a component, exposing the incrementality for optimization purposes. The signature of f is reversed from most other map functions.

module type S = sig ... end
type ('input, 'model, 'action, 'result) component_s = (module S with type Action.t = 'action and type Input.t = 'input and type Model.t = 'model and type Result.t = 'result)
val of_module : ('input, 'model, 'action, 'result) component_s -> default_model:'model -> ('input, 'result) t
OCaml

Innovation. Community. Security.