Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/recruit-tech/redux-page-scope
Page scope state management for Redux
https://github.com/recruit-tech/redux-page-scope
Last synced: about 11 hours ago
JSON representation
Page scope state management for Redux
- Host: GitHub
- URL: https://github.com/recruit-tech/redux-page-scope
- Owner: recruit-tech
- License: mit
- Created: 2016-08-14T17:45:53.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-26T07:46:56.000Z (over 7 years ago)
- Last Synced: 2023-12-24T11:03:21.598Z (11 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# redux-page-scope
## Installation
```
npm install --save redux-page-scope
```## Usage
### Installing Reducers
```javascript
import { combineReducers } from 'redux';
import { routerReducer } from 'react-router-redux';
import { pageScopeReducer } from 'redux-page-scope';const rootReducer = combineReducers({
routing: routerReducer,
page: pageScopeReducer(combineReducers({
// your reducers for page scope.
})),
...
});
```### Installing middlewares
```javascript
import { createStore, applyMiddleware } from 'redux';
import { browserHistory } from 'react-router';
import { routerMiddleware } from 'react-router-redux';
import pageScopeMiddleware from 'redux-page-scope';
import rootReducer from './reducers';const store = createStore(
rootReducer,
applyMiddleware(
routerMiddleware(browserHistory),
pageScopeMiddleware()
)
);
```