Skip to content

Commit ab8c958

Browse files
committed
Rename to stateless
1 parent abce4a5 commit ab8c958

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

Diff for: generated-docs/React/Basic.md

+11
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ The rendering function should return a value of type `JSX`, which can be
1616
constructed using the helper functions provided by the `React.Basic.DOM`
1717
module (and re-exported here).
1818

19+
#### `stateless`
20+
21+
``` purescript
22+
stateless :: forall props. { displayName :: String, render :: props -> JSX } -> ReactComponent props
23+
```
24+
25+
Create a stateless React component.
26+
27+
Removes a little bit of the `react` function's boilerplate when creating
28+
components which don't use state.
29+
1930
#### `createElement`
2031

2132
``` purescript

Diff for: src/React/Basic.purs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module React.Basic
22
( react
3-
, react_
3+
, stateless
44
, createElement
55
, createElementKeyed
66
, fragment
@@ -45,13 +45,13 @@ react { displayName, initialState, receiveProps, render } =
4545
-- |
4646
-- | Removes a little bit of the `react` function's boilerplate when creating
4747
-- | components which don't use state.
48-
react_
48+
stateless
4949
:: forall props
5050
. { displayName :: String
5151
, render :: props -> JSX
5252
}
5353
-> ReactComponent props
54-
react_ { displayName, render } =
54+
stateless { displayName, render } =
5555
react
5656
{ displayName
5757
, initialState: unit

0 commit comments

Comments
 (0)