Module
React.Basic.DOM.Components.Ref
- Package
- purescript-react-basic-dom
- Repository
- lumihq/purescript-react-basic-dom
This module provides an efficient (no ReactDOM.findDOMNode
) and
declarative way to aquire a Node
for an element in your render
tree.
For example:
render self =
ref \myRef ->
case myRef of
Nothing -> R.text "First DOM render in progress..."
Just _ -> R.text "First DOM render complete."
#selectorRef Source
selectorRef :: QuerySelector -> (Maybe Node -> JSX) -> JSX