0.4.0 • Published 8 years ago

frapp v0.4.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Frapp

npm Travis CI Codecov gzip size

Tiny fractal app framework strongly inspired by Hyperapp, written in typescript.

Features:

  • tiny size
  • functional reactive architecture (state -> view -> actions -> new state -> ...)
  • immutable state allows for powerful debug tools
  • fractal design: make apps composed of apps (it's apps all the way down!)
  • dynamically add sub-apps to main app

Examples & How to

1. Hello World

This simple example shows basic features:

import { frapp, h } from "frapp"

frapp({
  // state 
  name: "World",
  // actions (update the state and triggers a re-render)
  setName: (app, update) => event => update({ name: event.target.value })
  // view (pure function of state/actions)
  View: (app) => (
    <h1>Hello {app.name}!</h1>
    Name: <input type="text" value={app.name} onchange={app.setName}>
  )
})

2. Todo List

/!\ EXAMPLE NOT FINISHED /!\ This more advanced example shows how to compose sub-apps together and dynamically add them to the main app.

import { frapp, h } from "frapp"

const createTodo = (title) => ({
  // TODO
})

app({
  // TODO
})

License

Frapp is licensed as MIT. See LICENSE

0.4.0

8 years ago

0.3.0

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago