Skip to content

Commit caec2a7

Browse files
committed
Updating module documentation
1 parent 3050d3c commit caec2a7

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/React.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,14 @@ type UISpec props state eff = { render :: Render props state eff, displayName ::
160160

161161
A specification of a component.
162162

163+
#### `UIFactory`
164+
165+
``` purescript
166+
type UIFactory props = props -> UI
167+
```
168+
169+
Factory function for components.
170+
163171
#### `spec`
164172

165173
``` purescript
@@ -211,7 +219,7 @@ Transform the component state by applying a function.
211219
#### `mkUI`
212220

213221
``` purescript
214-
mkUI :: forall props state eff. UISpec props state eff -> props -> UI
222+
mkUI :: forall props state eff. UISpec props state eff -> UIFactory props
215223
```
216224

217225
Create a component from a component spec.
@@ -248,4 +256,12 @@ renderToElementById :: forall eff. String -> UI -> Eff (dom :: DOM | eff) UI
248256

249257
Render a component to the element with the specified ID.
250258

259+
#### `createElement`
260+
261+
``` purescript
262+
createElement :: forall props. UIFactory props -> props -> Array UI -> UI
263+
```
264+
265+
Create an element from a component factory.
266+
251267

0 commit comments

Comments
 (0)