@@ -160,21 +160,21 @@ type UISpec props state eff = { render :: Render props state eff, displayName ::
160
160
161
161
A specification of a component.
162
162
163
- #### ` UIFactory `
163
+ #### ` spec `
164
164
165
165
``` purescript
166
- type UIFactory props = props -> UI
166
+ spec :: forall props state eff. state -> Render props state eff -> UISpec props state eff
167
167
```
168
168
169
- Factory function for components .
169
+ Create a component specification .
170
170
171
- #### ` spec `
171
+ #### ` UIClass `
172
172
173
173
``` purescript
174
- spec :: forall props state eff. state -> Render props state eff -> UISpec props state eff
174
+ data UIClass :: * -> *
175
175
```
176
176
177
- Create a component specification .
177
+ Factory function for components .
178
178
179
179
#### ` getProps `
180
180
@@ -227,10 +227,10 @@ Transform the component state by applying a function.
227
227
#### ` mkUI `
228
228
229
229
``` purescript
230
- mkUI :: forall props state eff. UISpec props state eff -> UIFactory props
230
+ mkUI :: forall props state eff. UISpec props state eff -> UIClass props
231
231
```
232
232
233
- Create a component from a component spec .
233
+ Create a React class from a specification .
234
234
235
235
#### ` handle `
236
236
@@ -240,36 +240,36 @@ handle :: forall eff ev props state result. (ev -> EventHandlerContext eff props
240
240
241
241
Create an event handler.
242
242
243
- #### ` renderToString `
243
+ #### ` render `
244
244
245
245
``` purescript
246
- renderToString :: UI -> String
246
+ render :: forall eff. UI -> Element -> Eff (dom :: DOM | eff) UI
247
247
```
248
248
249
- Render a component as a string .
249
+ Render a React element in a document element .
250
250
251
- #### ` renderToBody `
251
+ #### ` renderToString `
252
252
253
253
``` purescript
254
- renderToBody :: forall eff. UI -> Eff (dom :: DOM | eff) UI
254
+ renderToString :: UI -> String
255
255
```
256
256
257
- Render a component to the document body .
257
+ Render a React element as a string .
258
258
259
- #### ` renderToElementById `
259
+ #### ` createElement `
260
260
261
261
``` purescript
262
- renderToElementById :: forall eff. String -> UI -> Eff (dom :: DOM | eff) UI
262
+ createElement :: forall props. UIClass props -> props -> Array UI -> UI
263
263
```
264
264
265
- Render a component to the element with the specified ID .
265
+ Create an element from a React class .
266
266
267
- #### ` createElement `
267
+ #### ` createFactory `
268
268
269
269
``` purescript
270
- createElement :: forall props. UIFactory props -> props -> Array UI -> UI
270
+ createFactory :: forall props. UIClass props -> props -> UI
271
271
```
272
272
273
- Create an element from a component factory .
273
+ Create a factory from a React class .
274
274
275
275
0 commit comments