File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -146,10 +146,6 @@ foreign import createComponent
146
146
. String
147
147
-> Component props
148
148
149
- -- | A simplified alias for `ComponentSpec`. This type is usually used to represent
150
- -- | the default component type returned from `createComponent`.
151
- -- type Component props = forall state action. ComponentSpec props state action
152
-
153
149
-- | Opaque component information for internal use.
154
150
-- |
155
151
-- | __*Note:* Never define a component with
@@ -291,7 +287,7 @@ foreign import make
291
287
:: forall spec spec_ props state action
292
288
. Union spec spec_ (ComponentSpec props state action )
293
289
=> Component props
294
- -> { render :: Self props state action -> JSX | spec }
290
+ -> { initialState :: state , render :: Self props state action -> JSX | spec }
295
291
-> props
296
292
-> JSX
297
293
@@ -318,7 +314,7 @@ makeStateless
318
314
-> props
319
315
-> JSX
320
316
makeStateless component render =
321
- make component { render: \self -> render self.props }
317
+ make component { initialState: unit, render: \self -> render self.props }
322
318
323
319
-- | Represents rendered React VDOM (the result of calling `React.createElement`
324
320
-- | in JavaScript).
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ asyncWithLoader loader = make component
28
28
, didMount: launch
29
29
-- , didUpdate: No! Implementing `didUpdate` breaks the
30
30
-- Aff/Component lifecycle relationship.
31
+ -- To update the Aff over time, wrap this
32
+ -- component with `keyed`.
31
33
, willUnmount: cleanup
32
34
}
33
35
where
You can’t perform that action at this time.
0 commit comments