How to use createRenderer with streams in InfernoJS?

92 Views Asked by At

InfernoJS gives a very interesting but unfortunately very brief sketch of a purely functional way to bootstrap an app:

import Inferno from 'inferno';
import { scan, map } from 'most';

...
const model$ = scan(update, 0, actions$);
const vNodes$ = map(view(actions$), model$);
const renderer = Inferno.createRenderer();
const runApp = () => scan(renderer, container, vNodes$).drain();

runApp();

Can anyone give a fully functional example of an app designed this way?

1

There are 1 best solutions below

0
On

Here is an example: https://github.com/joshburgess/inferno-most-fp-demo

It's simply a functional counter but a good starting point nonetheless.