<commit_before>## What is this?
Few days ago I started this project as a spin-off from [navigator-rfc])(https://github.com/ericvicenti/navigation-rfc). This repo is an implementation of the super-simple navigator behavior (without animated transitions! Please, keep it in mind).

## Motivation
To make a proof of concept for react-native navigator (based on navigator-rfc), driven by redux.

## Getting started
First of all, check [an example](https://github.com/Kureev/navigator-redux/tree/master/example/Basic) I've made. In `index.ios.js` you'll find the most important parts.

### Installation
As usual:
```bash
$ npm i navigator-redux --save
```
Then include it in your code:
```js
import {NavigatorRedux, makeNavState, navigationReducer} from 'navigator-redux';
```
And finally, use it to make your navigation to work:
```jsx
const store = createStore(
  navigationReducer,
  makeNavState([<SomeInitialView/>])
);

AppRegistry.registerComponent('Basic', () => () => (
  <Provider store={store}>
    <NavigatorRedux />
  </Provider>
));
```


## Status
- [x] Simple navigation
- [ ] Animated transitions<commit_msg>Update README.md by adding a new API section<commit_after>## What is this?
Few days ago I started this project as a spin-off from [navigator-rfc])(https://github.com/ericvicenti/navigation-rfc). This repo is an implementation of the super-simple navigator behavior (without animated transitions! Please, keep it in mind).

## Motivation
To make a proof of concept for react-native navigator (based on navigator-rfc), driven by redux.

## Getting started
First of all, check [an example](https://github.com/Kureev/navigator-redux/tree/master/example/Basic) I've made. In `index.ios.js` you'll find the most important parts.

### Installation
As usual:
```bash
$ npm i navigator-redux --save
```
Then include it in your code:
```js
import {NavigatorRedux, makeNavState, navigationReducer} from 'navigator-redux';
```
And finally, use it to make your navigation to work:
```jsx
const store = createStore(
  navigationReducer,
  makeNavState([<SomeInitialView/>])
);

AppRegistry.registerComponent('Basic', () => () => (
  <Provider store={store}>
    <NavigatorRedux />
  </Provider>
));
```

## API
Each view in the stack, while rendered, will receive a `nav` property with `index`, `stack` and `actions`.
- **index** {Number}. Used to track your navigation stack position
- **stack** {Immutable.Stack}. Your navigation stack
- **actions** {Object}:
  - **push(component)**. Push a new navigation state
  - **pop()**. Jump back to the previous navigation state
  - **replace(component)**. Replace a current navigation state component by a given one

For further reading, [check an example](https://github.com/Kureev/navigator-redux/blob/master/example/Basic/Content.js#L50-L66).

## Status
- [x] Simple navigation
- [ ] Animated transitions
{'fraction_non_alphanumeric': 0.1319104268719384, 'fraction_numerical': 0.0013995801259622112, 'mean_word_length': 4.729458917835672, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2383772', 'n_tokens_mistral': 870, 'n_tokens_neox': 831, 'n_words': 303}