From de98b8d9f08346824989507e3aeaf43d55f54c59 Mon Sep 17 00:00:00 2001 From: Colin Megill Date: Wed, 11 Oct 2017 00:03:19 -0700 Subject: [PATCH] stub onurlchange reducer --- src/reducers/onURLchange.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/reducers/onURLchange.js 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;