redux-first-history
Advanced tools
Comparing version 4.0.0-alpha.2 to 4.0.0-alpha.3
@@ -20,3 +20,3 @@ 'use strict'; | ||
var CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; | ||
var CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; | ||
var LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE'; | ||
@@ -205,3 +205,10 @@ | ||
//length tunnel | ||
Object.defineProperty(reduxFirstHistory, 'length', { | ||
get: function get() { | ||
return history.length; | ||
} | ||
}); | ||
return reduxFirstHistory; | ||
}; |
{ | ||
"name": "redux-first-history", | ||
"version": "4.0.0-alpha.2", | ||
"version": "4.0.0-alpha.3", | ||
"description": "Redux First History - Redux 100% SINGLE-AND-ONLY source of truth! - Tested on react-router v4 and reach-router. ", | ||
@@ -5,0 +5,0 @@ "main": "lib/redux-first-history.js", |
# redux-first-history | ||
Redux First History - Redux 100% SINGLE-AND-ONLY source of truth! | ||
### Always. Whatever happens. | ||
### Main Goal | ||
```javascript | ||
this.context.history.location === state.router.location | ||
this.context.router.history.location === state.router.location | ||
this.props.history.location === state.router.location | ||
this.props.location === state.router.location | ||
``` | ||
### Always. Whatever happens. | ||
--- | ||
# Usage | ||
@@ -17,2 +19,1 @@ ``` | ||
@@ -10,3 +10,3 @@ /************************************************* DEFAULT OPTIONS ***************************************************/ | ||
const CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; | ||
export const CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; | ||
export const LOCATION_CHANGE = '@@router/LOCATION_CHANGE'; | ||
@@ -141,3 +141,10 @@ | ||
//length tunnel | ||
Object.defineProperty(reduxFirstHistory, 'length', { | ||
get() { | ||
return history.length; | ||
}, | ||
}); | ||
return reduxFirstHistory; | ||
}; |
138897
317
19