useRequestSize lets the view ask the host to resize it to fit its content.
Example
The carousel grows to fit its product grid as items load, and widens to show the full catalog when the shopper expands it.useLayout rather than assuming the request took.
Returns
useRequestSize returns a single function.
requestSize
width and height in pixels; omit a dimension to leave it unchanged. The promise resolves once the request is sent, not once the host applies it: the host is free to clamp, ignore, or partially honor the size.
useLayout
Read the height the host actually grants the view
useDisplayMode
Switch the view between inline, fullscreen, and pip
Design for the Host
Size and shape the view to fit the host