package brisk-reconciler

  1. Overview
  2. Docs
type ('node, 'childNode) t

Type of a react element after rendering

type ('node, 'childNode) root = {
  1. node : 'node;
  2. insertNode : parent:'node -> child:'childNode -> position:int -> 'node;
  3. deleteNode : parent:'node -> child:'childNode -> position:int -> 'node;
  4. moveNode : parent:'node -> child:'childNode -> from:int -> to_:int -> 'node;
}
val render : ('node, 'childNode) root -> 'childNode element -> ('node, 'childNode) t

Render one element by creating new instances.

val update : previousElement:'node element -> renderedElement:('parentNode, 'node) t -> 'node element -> ('parentNode, 'node) t

Update a rendered element when a new react element is received.

val flushPendingUpdates : ('parentNode, 'node) t -> ('parentNode, 'node) t

Flush pending state updates (and possibly add new ones).

val executeHostViewUpdates : ('parentNode, _) t -> 'parentNode

Execute pending updates to the OutputTree and return the new output tree. The return value can be ignored for mutable OutputTrees.

val executePendingEffects : ('a, 'b) t -> ('a, 'b) t

Executes pending effects from hooks. Note: effects won't run unless this function is a part of your runloop.

OCaml

Innovation. Community. Security.