File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,14 @@ getRefs :: forall write eff. UIRef -> Eff (refs :: ReactRefs (Read write) | eff)
192
192
193
193
Read the component refs.
194
194
195
+ #### ` getChildren `
196
+
197
+ ``` purescript
198
+ getChildren :: forall props eff. UIRef -> Eff (props :: ReactProps props | eff) (Array UI)
199
+ ```
200
+
201
+ Read the component children property.
202
+
195
203
#### ` writeState `
196
204
197
205
``` purescript
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ exports.getRefs = function(ctx) {
15
15
} ;
16
16
} ;
17
17
18
+ exports . getChildren = function ( ctx ) {
19
+ return function ( ) {
20
+ return ctx . props . children ;
21
+ } ;
22
+ } ;
23
+
18
24
exports . writeState = function ( ctx ) {
19
25
return function ( state ) {
20
26
return function ( ) {
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ module React
34
34
35
35
, getProps
36
36
, getRefs
37
+ , getChildren
37
38
38
39
, readState
39
40
, writeState
@@ -232,6 +233,11 @@ foreign import getRefs :: forall write eff.
232
233
UIRef ->
233
234
Eff (refs :: ReactRefs (Read write ) | eff ) Refs
234
235
236
+ -- | Read the component children property.
237
+ foreign import getChildren :: forall props eff .
238
+ UIRef ->
239
+ Eff (props :: ReactProps props | eff ) (Array UI )
240
+
235
241
-- | Write the component state.
236
242
foreign import writeState :: forall state eff .
237
243
UIRef ->
You can’t perform that action at this time.
0 commit comments