Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thewei/react-native-navigator
**[DEPRECATED]** A simple router for react native
https://github.com/thewei/react-native-navigator
Last synced: about 2 months ago
JSON representation
**[DEPRECATED]** A simple router for react native
- Host: GitHub
- URL: https://github.com/thewei/react-native-navigator
- Owner: thewei
- License: other
- Archived: true
- Created: 2015-09-13T04:53:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-03T12:10:40.000Z (over 6 years ago)
- Last Synced: 2024-12-02T02:15:48.774Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://github.com/thewei/react-native-navigator
- Size: 128 KB
- Stars: 74
- Watchers: 4
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-native - react-native-navigator ★74 - A simple router for react native (Components / Navigation)
- awesome-react-native - react-native-navigator ★74 - A simple router for react native (Components / Navigation)
- awesome-react-native - react-native-navigator ★74 - A simple router for react native (Components / Navigation)
- awesome-react-native-ui - react-native-navigator ★72 - A simple router for react native (Components / Navigation)
- awesome-react-native - react-native-navigator ★74 - A simple router for react native (Components / Navigation)
README
# react-native-navigator
[![Build Status](https://travis-ci.org/thewei/react-native-navigator.svg?branch=master)](https://travis-ci.org/thewei/react-native-navigator)
[![npm version](https://badge.fury.io/js/react-native-navigator.svg)](http://badge.fury.io/js/react-native-navigator)
[![NPM downloads](http://img.shields.io/npm/dm/react-native-navigator.svg?style=flat-square)](https://npmjs.org/package/react-native-navigator)A web like router for ReactNative
## Installation
```bash
$ npm install react-native-navigator --save
```## Example
index.ios.js:
```javascript
'use strict';import React from 'react-native';
import App from './src/app';React.AppRegistry.registerComponent('Example', () => App);
```app.js:
```javascript
import React from 'react-native';
import Navigator from 'react-native-navigator';
const {
Router,
Route
} = Navigator;import IndexPage from './pages/IndexPage';
import DocPage from './pages/DocPage';
import DocSection from './pages/DocSection';
import BreadcrumbNavSample from './pages/BreadcrumbNavSample';
import NavigationBarSample from './pages/NavigationBarSample';
import JumpingNavSample from './pages/JumpingNavSample';
import NavSimpleExample from './pages/NavSimpleExample';// Support params and query
export default class App extends React.Component{
render() {
return (
);
}
};export default App;
```
more example pleace checkout the example: `Example/index.ios.js`## API
- LinkTo( path, props )
- Back()## Contributing
- Fork this Repo first
- Clone your Repo
- Install dependencies by `$ npm install`
- Checkout a feature branch
- Feel free to add your features
- Make sure your features are fully tested
- Publish your local branch, Open a pull request
- Enjoy hacking <3