I developed a mobile Expo React Native App and I need to build a web version. When I try to run the app on web, I noticed that the components are rendering "rotated". That is, the width is the height and vice versa. I can't just switch the values due to large amount of components and flex styling. By checking web orientation it's say that is "portrait" and the app default orientation is "landscape", that's explain the problem.
According to Expo Orientation Documentation, I should be able to "rotate" the web screen with:
ScreenOrientation.lockPlatformAsync(ScreenOrientation.WebOrientationLock.LANDSCAPE);
But I got this error:
TypeError: lockPlatformAsync cannot be called with undefined option properties
I also tryied to change app.json
"orientation" value to "landscape", but this also doesn't worked.
Any suggestions?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…