npm i bik
var component =var html =var counter =// non-choodocumentbody// choohtml``
It also works standalone in the browser by including
build/bik.min.js. It provides a global
To write simple components and be able to use them outside of Choo.
- Support both choo and non-choo environments
- Direct access to the whole context (state + component)
- No events, only functions
render(...props) = bik(initialState, renderer(context, ...props))
Initialize a new
initialState is an
renderer function gets the whole context (state + component) as an argument, followed by the arguments of the
Called when the element was mounted via
Called when the element was unmounted via
Rerenders the component.
Called after the new tree has been generated, but not yet rendered.
Called after the new tree was rendered.
The current DOM Node in the document.