Skip to content

Commit 796debd

Browse files
author
Marcin Szamotulski
committed
React.DOM.Props.refCb
1 parent 90ea09b commit 796debd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/React/DOM/Props.purs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,12 @@ readOnly = unsafeMkProps "readOnly"
300300
ref :: String -> Props
301301
ref = unsafeMkProps "ref"
302302

303+
refCb
304+
:: forall props state
305+
. (ReactThis props state -> Eff (refs :: ReactRefs (write :: Write | access) | eff))
306+
-> Props
307+
refCb cb = unsafeMkProps "ref" (unsafePerformEff <<< cb)
308+
303309
rel :: String -> Props
304310
rel = unsafeMkProps "rel"
305311

0 commit comments

Comments
 (0)