Skip to content

Commit

Permalink
Merge pull request #36 from paf31/react
Browse files Browse the repository at this point in the history
Use purescript-react, fix #35
  • Loading branch information
paf31 committed Sep 4, 2015
2 parents 7f14315 + 89d7e7c commit 99bc287
Show file tree
Hide file tree
Showing 29 changed files with 98 additions and 4,391 deletions.
5 changes: 3 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
},
"dependencies": {
"purescript-dom": "^0.2.0",
"purescript-eff": "^0.1.0",
"purescript-maybe": "^0.3.0",
"purescript-monoid": "^0.3.0",
"purescript-eff": "^0.1.0",
"react": "^0.12.2"
"purescript-react": "^0.4.0",
"purescript-unsafe-coerce": "~0.1.0"
}
}
24 changes: 4 additions & 20 deletions docs/Thermite.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ for the component, and return a computation in the `Action` monad.
#### `Render`

``` purescript
type Render eff state props action = Context state action -> state -> props -> Array (Html eff) -> Html eff
type Render eff state props action = (action -> EventHandlerContext eff props state Unit) -> state -> props -> Array ReactElement -> ReactElement
```

A rendering function, which takes a `Context`, the current state and properties, an array
of child nodes and returns a HTML document.
A rendering function, which takes a event dispatcher function, the current state and
props, an arrayof child nodes and returns a HTML document.

#### `Spec`

Expand Down Expand Up @@ -76,25 +76,9 @@ Extend a `Spec` with a display name.
#### `createClass`

``` purescript
createClass :: forall eff state props action. Spec eff state props action -> ComponentClass props eff
createClass :: forall eff state props action. Spec eff state props action -> ReactClass props
```

Create a component class from a `Spec`.

#### `render`

``` purescript
render :: forall props eff. ComponentClass props eff -> props -> Eff (dom :: DOM | eff) Unit
```

Render a component class to the document body.

#### `renderTo`

``` purescript
renderTo :: forall props eff. Node -> ComponentClass props eff -> props -> Eff (dom :: DOM | eff) Unit
```

Render a component class to the specified node.


11 changes: 2 additions & 9 deletions docs/Thermite/Action.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ instance applyAction :: Apply (Action eff state)
instance applicativeAction :: Applicative (Action eff state)
instance bindAction :: Bind (Action eff state)
instance monadAction :: Monad (Action eff state)
instance monadEffAction :: MonadEff eff (Action eff state)
```

#### `runAction`

``` purescript
runAction :: forall eff state props action a. Context state action -> Action eff state a -> Eff eff Unit
runAction :: forall eff state props a. ReactThis props state -> Action (state :: ReactState (Read Write) state | eff) state a -> Eff (state :: ReactState (Read Write) state | eff) Unit
```

Run a computation in the `Action` monad.
Expand Down Expand Up @@ -67,14 +68,6 @@ Run an asynchronous computation.
The first argument is a function which takes a callback, and starts some asynchronous computation,
invoking the callback when the result is available.

#### `sync`

``` purescript
sync :: forall eff state a. Eff eff a -> Action eff state a
```

Run a synchronous computation.

#### `asyncSetState`

``` purescript
Expand Down
257 changes: 0 additions & 257 deletions docs/Thermite/Events.md

This file was deleted.

29 changes: 0 additions & 29 deletions docs/Thermite/Html.md

This file was deleted.

Loading

0 comments on commit 99bc287

Please sign in to comment.