Corex. Component
(Corex v0.2.0)
View Source
Preludes for component and Connect modules.
Every component reaches for the same handful of helper sets, and spelling each
one out as an import ..., only: [...] list produced dozens of near-identical
shapes that drifted as functions were added. use Corex.Component, :tier names
the set instead:
:connect- the HTML attribute builders a Connect module emits:list- normalization for the item collections list components render:api- coercions for values arriving fromhandle_eventparams, plusrespond_to_fields/1for the imperative API:form- theform_control_attrs/1macro and form field plumbing
Tiers compose, so use Corex.Component, [:connect, :list] is valid.
Summary
Functions
Shared attrs for form-capable components. Expand inside the component module
after use Phoenix.Component.