useHingeSelector
A hook that observes one value derived from the hinge. The component renders again only when that value changes:
useHingeChange returns the whole HingeState, so its component renders at every angle the hinge passes through while the device folds.
useHingeSelector observes only one value derived from the hinge, so its component renders only when that value changes. It is more efficient for components that don't need to know the hinge's angle.
Like useHingeChange, call it inside a HingeObserver or a pane of an ArrangementView.
The selector returns a string, a number, a boolean, null or undefined. Do not return an object, as it would never compare equal to the last one, breaking the optimization.