Corex. Attrs
(Corex v0.2.0)
View Source
Builders for the HTML attribute maps the Connect modules hand to templates.
Presence attributes follow the HTML convention where the attribute's mere
presence is the signal: "" renders as a bare attribute and nil omits it.
That is deliberately different from Checkable.Helpers, which emits the
"true" | "false" | "indeterminate" enum a tri-state control needs, and from
Corex.FormField.dataset_default_boolean/1, which always emits a string.
Summary
Functions
Emits the presence attribute only for an uncontrolled component.
Emits the presence attribute only for a controlled component.
Functions
Emits the presence attribute only for an uncontrolled component.
A controlled component takes its state from the server on every render, so the default-state attribute the hook reads on mount must not be emitted.
Emits the presence attribute only for a controlled component.