A Functional Reactive Programming architecture with xstream, built for React apps used by Lookback's frontend. Heavily inspired by CycleJS.
| Variant | Size |
|---|---|
| frap.js | 60 KB |
| frap.min.js (minified) | 18 KB |
| frap.min.js (minified & gzipped) | 4 KB |
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 frap as a dependency from npm.
Require it from within your Typescript or Javascript files:
import{setup}from'frap';// orconst{ setup }=require('frap');
Grab the bundle from the
distdirectory and put in your app's directory structure.Add as a
<script>tag in your HTML:<body><!-- your app --><scriptsrc="frap.min.js"></script></body>
TBD.
npm install
npx tsc -w # Watch and compile TSnpm test- Working example
- Proper types
- Proper bundle process
- More examples?
- More documentation