Expand description
The window’s measured size, and the hook components read it through.
The UI is authored here but measured by the Renderer, so the only way a Rust component can know how wide the window is, is for the Renderer to tell it. The Renderer sends one event when the size class changes and nothing in between, so this module is a single current value plus the list of components that asked to be told when it changes.
Structs§
- Node
Size - Reads the window’s size class inside a component, and re-renders it when the class changes.
- Window
Size - The window’s size, as the Renderer last measured it.
Functions§
- node_
size - The size a node last measured, or a zero size for one nothing has reported yet.
- use_
node_ size - Follows one node’s size, and re-renders this component when its class changes.
- use_
window_ size - window_
size - The size the Renderer last reported. Available outside a component too.