UNPKG
h-app
Version:
latest (0.0.0)
0.0.0
Elm-like app for javascript.
github.com/nichoth/model-message
nichoth/model-message
h-app
/
app.js
15 lines
(11 loc)
•
295 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var
Model
=
require
(
'./model'
)
function
App
(
render
) {
return
function
app
(
model
) {
var
m =
Model
(model)
render
(model.
view
(m.
state
(), m.
msg
)) m.
state
(
function
onChange
(
state
) {
render
(model.
view
(state, m.
msg
)) }) } }
module
.
exports
=
App