How to use the ferp.subscriptions function in ferp

To help you get started, we’ve selected a few ferp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ferp-js / ferp / examples / cli / timer-with-subscription.js View on Github external
const ferp = require('ferp');

const { updateLogger } = require('./updateLogger.js');

const { every } = ferp.subscriptions;

const { none } = ferp.effects;

ferp.app({
  init: [
    0,
    none(),
  ],

  update: updateLogger((_, state) => {
    const nextState = state + 1;
    return [
      nextState,
      none(),
    ];
  }),

ferp

Build functional and pure applications in NodeJS and the Browser!

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis