Scope the observation.
Observe the existing React root. Each root has its own hinge snapshot, with no extra native view.
Use the hook →REACT NATIVE · NEW ARCHITECTURE
Read hinge posture and angle through a React hook. Share the same native snapshot with code outside React through a scoped observer.
react-native-hinges
Animate from native hinge snapshots with the Reanimated integration.
Observe the existing React root. Each root has its own hinge snapshot, with no extra native view.
Use the hook →Native posture and a nullable angle describe each hinge. Arrays support more than one hinge without guessing sensor associations.
Read the type contract →UIKit hinge interactions and Android folding features share an API with explicit platform differences.
See native mappings →ONE SNAPSHOT. TWO WAYS TO READ.
Use useHinges() inside your React Native app for reactive updates.
For other consumers, create an observer and use get() and subscribe() with the same root tag.
const hinges = useHinges();
for (const hinge of hinges) {
const { status, angle } = hinge;
const degrees = angle === null
? null
: angle * 180 / Math.PI;
}
SEE THE NUMBERS
Run the native example on a supported device or foldable emulator to inspect posture and available angle readings.