flovv

A library for controlling app flows with ease

Usage no npm install needed!

<script type="module">
  import flovv from 'https://cdn.skypack.dev/flovv';
</script>

README

FLOVV

A library for controlling app flows with ease

Installation

NPM

npm i flovv --save

YARN

yarn add flovv

React Bindings

Redux Bindings

import { createController } from "flovv";
import { select, dispatch } from "flovv/redux";
import { createStore } from "redux";

const store = createStore((state = 0, { type }) => {
  if (type === "increment") return state + 1;
  return state;
});
function* Increment() {
  const count = yield select((state) => state);
  yield dispatch({ type: "increment" });
}

API References

Effects

retry(times, fn, ...args)

remove(key)

debounce(ms)

cancel()

cancel(cancellable)

cancel(key)

cancel(flow)

stale("when", promise)

stale("when", timeout)

stale("when", event, [checkFn])

stale("flow", flows, [checkFn])

partial(data)

partial(data, wait)

on(event)

on(event, flow, ...args)

Examples