# react-navigation-stack

> Stack navigator component for React Navigation

Latest version **2.10.4** (published 2021-03-01) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install react-navigation-stack
pnpm add react-navigation-stack
yarn add react-navigation-stack
bun add react-navigation-stack
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.10.4 |
| Published | 2021-03-01 |
| First published | 2018-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 387 |
| Maintainers | ericvicenti, brentvatne, satya164, kmag, osdnk |
| Keywords | react-native-component, react-component, react-native, ios, android, stack |

## Links

- npm: https://www.npmjs.com/package/react-navigation-stack
- Repository: https://github.com/react-navigation/react-navigation-stack
- Homepage: https://github.com/react-navigation/react-navigation-stack#readme
- Issues: https://github.com/react-navigation/react-navigation-stack/issues
- npm.io page: https://npm.io/package/react-navigation-stack

## Dependencies (2)

- [color](https://npm.io/package/color.md) ^3.1.3
- [react-native-iphone-x-helper](https://npm.io/package/react-native-iphone-x-helper.md) ^1.3.0

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 2.10.4 (latest) — 2021-03-01
- 2.0.0-alpha.42 (alpha) — 2019-12-18
- 0.0.0-5caca5c (experimental) — 2019-08-15
- 1.4.0-alpha.0 (next) — 2019-08-13
- 2.10.3 — 2021-02-21
- 2.10.2 — 2020-11-22
- 2.10.1 — 2020-11-04
- 2.10.0 — 2020-10-30
- 2.9.0 — 2020-10-26
- 2.8.4 — 2020-10-02
- 2.8.3 — 2020-09-24
- 2.8.2 — 2020-06-25
- 2.8.1 — 2020-06-25
- 2.8.0 — 2020-06-25
- 2.7.0 — 2020-06-08
- … 171 more at https://npm.io/package/react-navigation-stack/versions

## README

# React Navigation Stack

[![Build Status][build-badge]][build]
[![Version][version-badge]][package]
[![MIT License][license-badge]][license]

Stack navigator for use on iOS and Android.

## Installation

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

```sh
yarn add react-navigation-stack @react-native-community/masked-view react-native-safe-area-context
```

or

```sh
npm install react-navigation-stack @react-native-community/masked-view react-native-safe-area-context
```

## Usage

```js
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:

```sh
yarn bootstrap
```

While developing, you can run the example app with [Expo](https://expo.io/) to test your changes:

```sh
yarn example start
```

The code in this repo uses the source from [`@react-navigation/stack`](https://github.com/react-navigation/navigation-ex/tree/master/packages/stack) and patches it to make it usable in React Navigation 4. If you need to make changes, please send a pull request there.

If the change is specifically related to React Navigation 4 integration, first run `yarn patch:apply`, then change the files in `src/vendor` to resolve any conflicts and then run `yarn patch:create` to update the patch file with the latest changes.

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

```sh
yarn typescript
yarn lint
```

To fix formatting errors, run the following:

```sh
yarn lint --fix
```

## Docs

Documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/en/stack-navigator.html).

<!-- badges -->

[build-badge]: https://img.shields.io/circleci/project/github/react-navigation/stack/master.svg?style=flat-square
[build]: https://circleci.com/gh/react-navigation/stack
[version-badge]: https://img.shields.io/npm/v/react-navigation-stack.svg?style=flat-square
[package]: https://www.npmjs.com/package/react-navigation-stack
[license-badge]: https://img.shields.io/npm/l/react-navigation-stack.svg?style=flat-square
[license]: https://opensource.org/licenses/MIT

---
_Source: https://npm.io/package/react-navigation-stack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
