<commit_before># Redux-fly
The purpose of library to provide simple API for:
* Reducers registration at any time to any place in store of Redux. It provides opportunity for encapsulation of reducer logic, code splitting and creation of reused components.
* Creation and controlling of component state which is saved in store of Redux.

[![Build Status](https://travis-ci.org/MrEfrem/redux-fly.svg?branch=master)](https://travis-ci.org/MrEfrem/redux-fly)

## Installation
React-fly requires **React 15.x**, **Redux 3.x** and **React Redux 4.x**.
```
npm install --save redux-fly<commit_msg>Added the short example<commit_after># Redux-fly
The purpose of library to provide simple API for:
* Reducers registration at any time to any place in store of Redux. It provides opportunity for encapsulation of reducer logic, code splitting and creation of reused components.
* Creation and controlling of component state which is saved in store of Redux.

[![Build Status](https://travis-ci.org/MrEfrem/redux-fly.svg?branch=master)](https://travis-ci.org/MrEfrem/redux-fly)

```javascript
const Modal = ({ reduxState: { text, open }, reduxSetState }) => (
  <div style={{ display: open ? 'block' : 'none' }}>
    <p>{text}</p>    
    <button onClick={() => reduxSetState('CLOSE-MODAL', { open: false })}>Close</button>
  </div>
)

const EnhancedWelcome = createReducer({
  mountPath: 'modal',
  initialState: ({ text = 'Hello world!' }) => ({
    open: false,
    text
  }),
  listenActions: {
    'OPEN-MODAL': (state, action) => ({ open: true }),
    'CLOSE-MODAL': (state, action) => ({ open: false })
  }
})(Modal)
```

## Installation
React-fly requires **React 15.x**, **Redux 3.x** and **React Redux 4.x**.
```
npm install --save redux-fly
{'fraction_non_alphanumeric': 0.14844649021864212, 'fraction_numerical': 0.004602991944764097, 'mean_word_length': 4.301829268292683, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 14, 'https://': 4, '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': '6213049', 'n_tokens_mistral': 565, 'n_tokens_neox': 553, 'n_words': 183}