hooks icon indicating copy to clipboard operation
hooks copied to clipboard

Refactor useDeviceOrientation hook

Open LinusU opened this issue 4 years ago • 0 comments

Summary

Simplifies the code, and also fixes an issue where the initial value could be stale as described in #210

Test Plan

Will test this in a snack, will update with link shortly

What's required for testing (prerequisites)?

nothing special

What are the steps to reproduce (after prerequisites)?

change the orientation and observe the updated value

Compatibility

OS Implemented
iOS
Android
Web

Checklist

  • [ ] I have tested this on a device and a simulator
  • [n/a] I added the documentation in README.md
  • [n/a] I updated the typed files (TS and Flow)
  • [ ] I've created a snack to demonstrate the changes: LINK HERE

LinusU avatar Nov 04 '20 14:11 LinusU