baobab-deku
Simple helpers to use Baobab along with deku.
Installation
You can install baobab-deku easily through npm (note that you must have baobab
and deku
installed for the library to work):
# Installing necessary dependencies
npm install --save baobab deku
# Installing the lib
npm install --save baobab-deku
Usage
import Baobab from 'baobab';import dom element from 'deku';import createDispatcher branch from 'baobab-deku'; const createRenderer = dom; // 1. Creating our treeconst tree = counter: 0; // 2. Creating actions to mutate the counter { tree;} { tree;} // 3. Creating our dispatcher & rendererconst dispatcher = render = ; // 4. Creating a counter componentconst Counter = ; // 5. Rendering our app, pass the tree as context & refreshing on tree update { ;} tree;;