Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/react-navigation/stack
Stack navigator for React Navigation
https://github.com/react-navigation/stack
Last synced: 3 months ago
JSON representation
Stack navigator for React Navigation
- Host: GitHub
- URL: https://github.com/react-navigation/stack
- Owner: react-navigation
- License: mit
- Archived: true
- Created: 2018-08-03T21:15:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-24T17:26:27.000Z (over 4 years ago)
- Last Synced: 2024-04-14T08:30:45.514Z (7 months ago)
- Language: TypeScript
- Homepage:
- Size: 3.73 MB
- Stars: 390
- Watchers: 16
- Forks: 197
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
This package has been moved to https://github.com/react-navigation/react-navigation/tree/master/packages/stack
---
# 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 sync`, then change the files in `src/vendor` and then run `yarn patch` 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).
[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