@@ -160,21 +160,21 @@ type UISpec props state eff = { render :: Render props state eff, displayName ::
160160
161161A specification of a component.
162162
163- #### ` UIFactory `
163+ #### ` spec `
164164
165165``` purescript
166- type UIFactory props = props -> UI
166+ spec :: forall props state eff. state -> Render props state eff -> UISpec props state eff
167167```
168168
169- Factory function for components .
169+ Create a component specification .
170170
171- #### ` spec `
171+ #### ` UIClass `
172172
173173``` purescript
174- spec :: forall props state eff. state -> Render props state eff -> UISpec props state eff
174+ data UIClass :: * -> *
175175```
176176
177- Create a component specification .
177+ Factory function for components .
178178
179179#### ` getProps `
180180
@@ -227,10 +227,10 @@ Transform the component state by applying a function.
227227#### ` mkUI `
228228
229229``` 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
231231```
232232
233- Create a component from a component spec .
233+ Create a React class from a specification .
234234
235235#### ` handle `
236236
@@ -240,36 +240,36 @@ handle :: forall eff ev props state result. (ev -> EventHandlerContext eff props
240240
241241Create an event handler.
242242
243- #### ` renderToString `
243+ #### ` render `
244244
245245``` purescript
246- renderToString :: UI -> String
246+ render :: forall eff. UI -> Element -> Eff (dom :: DOM | eff) UI
247247```
248248
249- Render a component as a string .
249+ Render a React element in a document element .
250250
251- #### ` renderToBody `
251+ #### ` renderToString `
252252
253253``` purescript
254- renderToBody :: forall eff. UI -> Eff (dom :: DOM | eff) UI
254+ renderToString :: UI -> String
255255```
256256
257- Render a component to the document body .
257+ Render a React element as a string .
258258
259- #### ` renderToElementById `
259+ #### ` createElement `
260260
261261``` purescript
262- renderToElementById :: forall eff. String -> UI -> Eff (dom :: DOM | eff) UI
262+ createElement :: forall props. UIClass props -> props -> Array UI -> UI
263263```
264264
265- Render a component to the element with the specified ID .
265+ Create an element from a React class .
266266
267- #### ` createElement `
267+ #### ` createFactory `
268268
269269``` purescript
270- createElement :: forall props. UIFactory props -> props -> Array UI -> UI
270+ createFactory :: forall props. UIClass props -> props -> UI
271271```
272272
273- Create an element from a component factory .
273+ Create a factory from a React class .
274274
275275
0 commit comments