forked from ethul/purescript-webpack-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.purs
More file actions
25 lines (21 loc) · 703 Bytes
/
App.purs
File metadata and controls
25 lines (21 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module Example.App (app) where
import Prelude (Unit, (<$>), unit)
import React (ReactClass, ReactElement, Render, createClass, createElement, getProps, spec)
import React.DOM (div, text) as DOM
import Example.Header (header)
import Example.Body (body)
import Example.Footer (footer)
app :: ReactClass Unit
app = createClass (spec unit render)
where
render :: forall eff. Render Unit Unit eff
render this = render' <$> getProps this
where
render' :: Unit -> ReactElement
render' props =
DOM.div []
[ createElement header unit []
, createElement body unit []
, createElement footer unit []
, DOM.text "a"
]