diff --git a/src/reducers/onURLchange.js b/src/reducers/onURLchange.js new file mode 100644 index 00000000..cef99125 --- /dev/null +++ b/src/reducers/onURLchange.js @@ -0,0 +1,25 @@ +import URI from "urijs"; +/* + https://www.npmjs.com/package/url-parse +*/ + +const onURLchange = ( + state = {}, + action +) => { + switch (action.type) { + case 'url changed': { + const {url} = action; + + const parsed = URI.parseQuery(window.location.search); + + console.log("onURLchange sees: ", parsed) + + return state; + } + } + + return state; +} + +export default onURLchange;