nearform / react-native-workshop

A workshop that covers the basics of React Native
https://nearform.github.io/react-native-workshop/
2 stars 0 forks source link

Navigation spacing pushes the playable area outside of the screen #32

Closed haydnjm closed 1 year ago

haydnjm commented 1 year ago

When following the navigation step in step 6 the spacing that the navigation bar adds means that the playable space goes beyond the bottom of the screen. The size of the navigation needs to be taken into account when calculating the playable area.

AlanSl commented 1 year ago

Good catch, thanks for the report! I've updated and force-pushed that branch with some extra content showing how to use React Navigation's useHeaderHeight to get the header height and take that into account when feeding the playable height into the game hook