Skip to content

Repository files navigation

Frap

Frap – "Functional Reactive App"

A Functional Reactive Programming architecture with xstream, built for React apps used by Lookback's frontend. Heavily inspired by CycleJS.

VariantSize
frap.js60 KB
frap.min.js (minified)18 KB
frap.min.js (minified & gzipped)4 KB

Examples

See examples directory for more code. Knowledge of how to program with streams is assumed.

We use:

  • React as view, but you can use any view library that can draw from a single state object.
  • Typescript, because we're not insane.

Install

Via npm

  1. Install frap as a dependency from npm.

  2. Require it from within your Typescript or Javascript files:

    import{setup}from'frap';// orconst{ setup }=require('frap');

Browser script tag

  1. Grab the bundle from the dist directory and put in your app's directory structure.

  2. Add as a <script> tag in your HTML:

    <body><!-- your app --><scriptsrc="frap.min.js"></script></body>

Get started

TBD.

Develop

npm install
npx tsc -w # Watch and compile TS

Tests

npm test

To Do

  • Working example
  • Proper types
  • Proper bundle process
  • More examples?
  • More documentation

About

A little functional reactive architecture for JS apps.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages