Fritz bindings for Raj
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test/basics
.gitignore
Makefile
package.json
raj-fritz.js
raj-fritz.umd.js
readme.md
rollup.config.js
yarn.lock

readme.md

Raj Fritz

Fritz bindings for Raj

Installation

yarn add raj-fritz

Usage

import { program } from 'raj-fritz';
import fritz, { h } from 'fritz';

const counterProgram = {
  init: [0],
  update (message, count) {
    switch(message) {
      case 'increment':
        return [count + 1];
      default:
        return [count];
    }
  },
  view (count, dispatch) {
    return (
      <div>
        <div>Count: {count}</div>
        <button onClick={() => dispatch('increment')}>Click me</button>
      </div>
    );
  }
};

const App = program(fritz.Component, props => counterProgram);

fritz.define('basic-app', App);

Documentation

TODO

License

BSD-2-Clause