Expand description
Which design system the Renderer resolved the theme to, and the registrations a runtime wakes its readers through.
The theme names a system or asks for the platform’s, and the answer is worked out in the Renderer where the platform is known. Most screens never need it: colour, shape, spacing and type are roles, and a role is the same declaration whatever answers it.
What roles cannot carry is a screen that is a different screen. Apple’s calculator has
no memory row and clears with AC; Windows’ has one and clears with C. Both are
calculators and neither is a restyling of the other.
So the Renderer reports its answer the way it reports a size class: once, and again
only when the answer changes. This module is that value plus the readers that asked to
be told. How a reader asks is the authoring layer’s: the Dioxus adapter’s
use_design_system hook holds a DesignSystemSubscription.
Structs§
- Design
System Subscription - A registration for changes to the resolved design system. Dropping it ends the registration, so a runtime keeps it for as long as the reader it wakes is alive: with a component’s hook state, or a scope’s remembered values.
Functions§
- design_
system - The system the Renderer last reported. Available outside a component too.
- subscribe
- Registers
notifyto be called each time the Renderer reports a different design system. Whatnotifydoes is the runtime’s business: mark a scope dirty, most often.