Files
react-navigation/packages/stack
satyajit.happy bd0e602143 fix: properly handle floating header height
Previously, the header height wasn't stored per screen. This resulted in header height always referring to the one in last mounted screen.
As a result, the top margin for screens were incorrect.

This resulted in bugs such as when you go to a screen with no header, header height will stay 0 even after navigating back.

This commit stores the height for each screen separately, handling this properly.
2019-07-07 15:21:46 +02:00
..
2019-04-17 14:47:03 +02:00
2018-08-03 14:59:12 -07:00
2019-04-17 14:47:03 +02:00
2019-04-17 14:47:03 +02:00
2018-08-03 14:59:12 -07:00
2019-07-07 14:51:21 +02:00
2019-07-06 13:08:18 +02:00

React Navigation Stack

CircleCI badge

Stack navigator for use on iOS and Android.

Installation

Open a Terminal in your project's folder and run,

yarn add react-navigation-stack

Usage

import { createStackNavigator } from 'react-navigation-stack';

export default createStackNavigator({
  Inbox: InboxScreen
  Drafts: DraftsScreen,
}, {
  initialRouteName: 'Inbox',
});

Development workflow

To setup the development environment, open a Terminal in the repo directory and run the following:

yarn bootstrap

While developing, you can run the example app with Expo to test your changes:

yarn example start

Make sure your code passes TypeScript and ESLint. Run the following to verify:

yarn typescript
yarn lint

To fix formatting errors, run the following:

yarn lint --fix

Docs

Documentation can be found on the React Navigation website.