redux-first-history
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -12,3 +12,2 @@ import { History } from "history"; | ||
} | ||
declare function reachify(reduxHistory: History<any>): reachHistory; | ||
@@ -20,2 +19,4 @@ export interface IHistoryContextOptions { | ||
reduxTravelling?: boolean; | ||
showHistoryAction?: boolean; | ||
selectRouterState?: any, | ||
} | ||
@@ -30,2 +31,12 @@ | ||
export function createReduxHistoryContext(options: IHistoryContextOptions): IHistoryContext; | ||
export const push: (to: string) => Action; | ||
export function reachify(reduxHistory: History<any>): reachHistory; | ||
export const push: (to: any) => Action; | ||
export const replace : (to: any) => Action; | ||
export const go : (to: any) => Action; | ||
export const goBack : (to: any) => Action; | ||
export const goForward : (to: any) => Action; | ||
export const CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; | ||
export const LOCATION_CHANGE = '@@router/LOCATION_CHANGE'; |
{ | ||
"name": "redux-first-history", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "Redux First History - Make Redux 100% SINGLE-AND-ONLY source of truth again! - Tested on react-router v4 and reach-router.", | ||
@@ -53,4 +53,6 @@ "main": "lib/redux-first-history.js", | ||
"eslint-config-defaults": "^9.0.0", | ||
"eslint-plugin-import": "^2.17.2" | ||
"eslint-plugin-import": "^2.17.2", | ||
"eslint-plugin-jsx-a11y": "^6.2.1", | ||
"eslint-plugin-react": "^7.13.0" | ||
} | ||
} |
@@ -1,5 +0,9 @@ | ||
# redux-first-history [](https://www.npmjs.org/package/redux-first-history) | ||
# redux-first-history | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/redux-first-history"><img src="https://img.shields.io/npm/v/redux-first-history.svg?style=flat-square"></a> | ||
<a href="https://www.npmjs.com/packageredux-first-history"><img src="https://img.shields.io/npm/dm/redux-first-history.svg?style=flat-square"></a> | ||
</p> | ||
Redux First History - Make Redux 100% SINGLE-AND-ONLY source of truth again! | ||
## Main Goal | ||
@@ -53,3 +57,3 @@ *Use whatever you like. History will just work as it should.* | ||
const { createReduxHistory, routerMiddleware, routerReducer} = createReduxHistoryContext({ | ||
const { createReduxHistory, routerMiddleware, routerReducer } = createReduxHistoryContext({ | ||
history: createHistory(), | ||
@@ -126,3 +130,7 @@ //others options if needed | ||
export const createReduxHistoryContext = ({ | ||
history, routerReducerKey = 'router', oldLocationChangePayload = false, reduxTravelling = false, | ||
history, | ||
routerReducerKey = 'router', | ||
oldLocationChangePayload = false, | ||
reduxTravelling = false, | ||
selectRouterState = null | ||
}) | ||
@@ -137,2 +145,3 @@ ``` | ||
|reduxTravelling | yes | if you want to play with redux-dev-tools :D. | ||
|selectRouterState |yes | custom selector for router state. With redux-immutable selectRouterState = state => state.get("router") | ||
@@ -149,3 +158,2 @@ # Feedback | ||
* warning for uncorrect usage | ||
* typescript support | ||
* try to use it with non-react-like other framework! | ||
@@ -152,0 +160,0 @@ * redux-first-app POC |
26746
445
172
17