React Native Expo Screen Orientation

Letting Expo Handle the Screen Orientation

Delete the default orientaion in the app.json

“expo”: {
“name”: “project”,
“slug”: “project”,
“version”: “1.0.0”,
“orientation”: “portrait”, //Delete this line
“icon”: “./assets/icon.png”,
“splash”: {
},

and install

 expo install expo-screen-orientation 

then add below lines to handle orientation.

"plugins": [
  [
    "expo-screen-orientation",
    {
      "initialOrientation": "DEFAULT"
    }
  ]
],

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>