Crate bloom_core

Source

Structs§

NodeStream

Enums§

Element
The element type is returned from component render-functions. It can be constructed from a Node-type, e.G. HtmlNode, or a Component.

Traits§

Component
The component trait is the core of the bloom library. It represents the basic unit of a bloom application.
ObjectModel

Functions§

_get_context
render_loop
render_loop can be used to implement interactive renderers on top of bloom-core. The primary renderer is the bloom-client library which implements client side rendering in the browser on top of bloom using webassembly. The root is the root node in the host environment which will contain the rendered UI. In web-environments the root might be a div within the body that is part of the server-sent html:
render_stream
render_stream is the main way to render some bloom-based UI once. It takes an element and a spawner and returns a stream of nodes. Libraries like bloom-server use this to render the UI to a stream of serialized HTML to implement server-side rendering.
use_context
use_effect
use_ref
use_ref can be used to obtain a persistent reference to an object. The object returned from ref is guaranteed to be the same object on every subsequent call to a component’s render-function. The most common use case is with HtmlNodes:
use_ref_with_default
use_state
Analog to react’s useState API. Pass a callback to build the initial state. The returned State-object can be used to read and update the state.