GitHub - calumjames/react-native-orientation-example: A simple example of handling orientation in React Native. · GitHub
Skip to content

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

React Native orientation example

A simple example of handling orientation changes in React Native. Run the app using Expo.

I've seen issues with the React Native Dimensions "change" event not firing sometimes in a more complex app, so I'm keeping this here to play around with whenever I see it not working, to see if I can figure out consistent reproduction steps.

If you'd like to play around with this, you can clone the repo, install the dependencies, run the start script, and rotate the simulator to see the text changing.

The official Expo site includes information on how to set up your iOS or Android simulator, along with installing the Expo CLI if you'd like to.

NOTE: When Expo supports React Hooks, I'll move the orientation piece to a hook.

About

A simple example of handling orientation in React Native.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages