Search results

This module defines helper functions for creating virtual DOM elements safely.

Note: DOM element props are provided as records, and checked using Union constraints. This allows callers to supply only a subset of the props, and the compiler will ensure that the provided props exist and have the correct types.

P purescript-react-basic-dom

THIS FILE IS GENERATED -- DO NOT EDIT IT Instead edit files under 'codegen/' dir and regenerate with: npm install

node ./index.js

P purescript-react-basic-dom
P purescript-react-basic-textf
P purescript-react-basic-dom

This module defines safe DOM event function and property accessors.

P purescript-react-basic-dom
P purescript-react-basic-dom
P purescript-react-basic-dom

THIS FILE IS GENERATED -- DO NOT EDIT IT Instead edit files under 'codegen/' dir and regenerate with: npm install

node ./index.js

P purescript-react-basic-dom
P purescript-react-basic-textf
P purescript-react-basic-textf
P purescript-react-basic-textf
P purescript-react-basic-textf
P purescript-react-basic-textf
P purescript-react-basic-textf
P purescript-react-basic-textf

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."
P purescript-react-basic-dom
P purescript-react-basic-textf
P purescript-react-basic-textf
P purescript-react-basic-dom
P purescript-react-basic-textf
P purescript-react-basic-textf

THIS FILE IS GENERATED -- DO NOT EDIT IT Instead edit files under 'codegen/' dir and regenerate with: npm install

node ./index.js

P purescript-react-basic-dom
P purescript-react-basic-textf

These helper components register and unregister event callbacks using React's the lifecycle callbacks. They're useful for declaratively defining global behavior which is associated with a particular component being mounted without having to wire all that lifecycle logic up manually.

For example:

render self =
  R.div
    { className: "dropdown-wrapper"
    , children:
        [ dropdownButton
        , guard showDropdown $
            windowEvent
              { eventType: EventType "click"
              , options: defaultOptions
              , handler: \_ -> send self CloseDropdown
              }
              dropdownMenu
        ]
    }
P purescript-react-basic-dom

No further results.