useHingeChange
A hook to consume the hinge state changes. Call the hook inside a HingeObserver or an ArrangementView. It observes whichever of the two is nearer.
The hook returns the current HingeState, and subscribes the component to updates. It invokes the callback with the initial unavailable state and then changed values.
The component renders again at every angle the hinge reports. For more granular updates and better performance, use useHingeSelector.
HingeState
Before the first native update, without hardware, or when observation is disabled, the state is { available: false, angle: null, status: 'unknown' }.