Function bindProps

  • Binds children to element.

    • Props of type boolean will be treated as a boolean attribute usind toggleAttribute, and will follow the rules of boolean attributes
    • Props of type string, number, bigint will be cast to a string before being added as an attribute to element
    • Props that begin with "on" and have a function value will be added as event listeners, where the name of the event is the key name without the "on" prefix, all set to lower case, and the function is the handler.
    • The ref prop can be a Ref or array of Ref, and the current value of the ref(s) will be set to the current element
    • Props that have the value null will be removed from element
    • Props that have the value undefined will be ignored
    • Props that do not fit the above criteria will generate a warning (and be ignored)

    Parameters

    Returns void

  • Binds children to element.

    • Props of type boolean will be treated as a boolean attribute usind toggleAttribute, and will follow the rules of boolean attributes
    • Props of type string, number, bigint will be cast to a string before being added as an attribute to element
    • Props that begin with "on" and have a function value will be added as event listeners, where the name of the event is the key name without the "on" prefix, all set to lower case, and the function is the handler.
    • The ref prop can be a Ref or array of Ref, and the current value of the ref(s) will be set to the current element
    • Props that have the value null will be removed from element
    • Props that have the value undefined will be ignored
    • Props that do not fit the above criteria will generate a warning (and be ignored)

    Parameters

    Returns void

  • Binds children to element.

    • Props of type boolean will be treated as a boolean attribute usind toggleAttribute, and will follow the rules of boolean attributes
    • Props of type string, number, bigint will be cast to a string before being added as an attribute to element
    • Props that begin with "on" and have a function value will be added as event listeners, where the name of the event is the key name without the "on" prefix, all set to lower case, and the function is the handler.
    • The ref prop can be a Ref or array of Ref, and the current value of the ref(s) will be set to the current element
    • Props that have the value null will be removed from element
    • Props that have the value undefined will be ignored
    • Props that do not fit the above criteria will generate a warning (and be ignored)

    Parameters

    • element: Element

      Element to bind props to

    • Optional props: null | GeneralProps<Node>

      Props to bind with

    • Optional ns: boolean

      If namespace element

    Returns void

Generated using TypeDoc