raj-fritz

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i raj-fritz

Weekly Downloads

0

Version

1.0.1

License

BSD-2-Clause

Unpacked Size

7.56 kB

Total Files

4

Last publish

Collaborators

  • matthewp