Skip to content

Commit 5611d2c

Browse files
committed
README: mention alpha quality
1 parent 313b880 commit 5611d2c

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

README.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
purescript-react
22
================
33

4-
React Bindings for PureScript
4+
React Bindings for PureScript.
5+
6+
**WARNING:** This is alpha quaility software and you need to use [nightly build
7+
of React][nightly].
58

69
```haskell
710
module Main where
811

912
import React
10-
import qualified React.DOM as DOM
13+
import React.DOM
1114

1215
hello = mkUI spec do
1316
props <- getProps
14-
return $ DOM.h1 {
15-
className: "Hello"
16-
} [
17-
DOM.text "Hello, ",
18-
DOM.text props.name
17+
return $ h1 [
18+
className "Hello"
19+
] [
20+
text "Hello, ",
21+
text props.name
1922
]
2023

2124
incrementCounter = do
@@ -24,15 +27,17 @@ incrementCounter = do
2427

2528
counter = mkUI spec { getInitialState = return 0 } do
2629
val <- readState
27-
return $ DOM.p {
28-
className: "Counter",
29-
onClick: handle incrementCounter
30-
} [
31-
DOM.text (show val),
32-
DOM.text " Click me to increment!"
30+
return $ p [
31+
className "Counter",
32+
onClick incrementCounter
33+
] [
34+
text (show val),
35+
text " Click me to increment!"
3336
]
3437

3538
main = do
36-
let component = DOM.div {} [hello {name: "World"}, counter {}]
39+
let component = div {} [hello {name: "World"}, counter {}]
3740
renderToBody component
3841
```
42+
43+
[nightly]: http://react.zpao.com/builds/master/latest/react.js

0 commit comments

Comments
 (0)