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)
192192
193193Read the component refs.
194194
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+
195203#### ` writeState `
196204
197205``` purescript
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ exports.getRefs = function(ctx) {
1515 } ;
1616} ;
1717
18+ exports . getChildren = function ( ctx ) {
19+ return function ( ) {
20+ return ctx . props . children ;
21+ } ;
22+ } ;
23+
1824exports . writeState = function ( ctx ) {
1925 return function ( state ) {
2026 return function ( ) {
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ module React
3434
3535 , getProps
3636 , getRefs
37+ , getChildren
3738
3839 , readState
3940 , writeState
@@ -232,6 +233,11 @@ foreign import getRefs :: forall write eff.
232233 UIRef ->
233234 Eff (refs :: ReactRefs (Read write ) | eff ) Refs
234235
236+ -- | Read the component children property.
237+ foreign import getChildren :: forall props eff .
238+ UIRef ->
239+ Eff (props :: ReactProps props | eff ) (Array UI )
240+
235241-- | Write the component state.
236242foreign import writeState :: forall state eff .
237243 UIRef ->
You can’t perform that action at this time.
0 commit comments