From c5bb82f31e39cc27715f0f08d36e629ac0b1a820 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 30 May 2018 10:02:55 -0400 Subject: [PATCH] Remove remnants of redux --- package.json | 1 + src/configureStore.js | 14 -------------- src/index.js | 2 -- src/wsCache.js | 9 +-------- yarn.lock | 11 +++++++++++ 5 files changed, 13 insertions(+), 24 deletions(-) delete mode 100644 src/configureStore.js diff --git a/package.json b/package.json index c80802e..76b2931 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "inferno": "^5.0.1", "inferno-bootstrap": "^5.0.0", "inferno-dev-utils": "^5.3.0", + "inferno-redux": "^5.0.6", "inferno-router": "^5.0.1", "lodash": "^4.17.10", "sqlite3": "^4.0.0", diff --git a/src/configureStore.js b/src/configureStore.js deleted file mode 100644 index 363faec..0000000 --- a/src/configureStore.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Redux setup - */ -import { combineReducers, createStore } from 'redux'; - -import * as reducers from '//reducers'; - -const configureStore = (defaultState = {}) => { - return createStore(combineReducers({ - ...reducers, - }), defaultState); -}; - -export default configureStore; diff --git a/src/index.js b/src/index.js index 058738f..8d70245 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,5 @@ import { render } from 'inferno'; -import { Provider } from 'inferno-redux'; -import configureStore from './configureStore'; import { App } from './App'; import WSCache from './wsCache'; diff --git a/src/wsCache.js b/src/wsCache.js index b6fc036..91f8773 100644 --- a/src/wsCache.js +++ b/src/wsCache.js @@ -5,9 +5,9 @@ export class wsCache { constructor (ws) { this.ws = ws - this.ws.addEventListener('open', this.onWebSocketOpen); this.ws.addEventListener('message', this.onWebSocketMessage); this.ws.addEventListener('close', this.onWebSocketClose); + this.ws.addEventListener('error', console.error); // Websocket channels // These hold previous messages if they are needed later @@ -26,7 +26,6 @@ export class wsCache { } _.bindAll(this, [ - 'onWebSocketOpen', 'onWebSocketClose', 'onWebSocketMessage', 'publish', @@ -36,10 +35,6 @@ export class wsCache { ]) } - onWebSocketOpen () { - window.wsCache.publish('default', 'Websocket opened'); - } - onWebSocketClose () { console.info('WebSocket closed'); } @@ -76,8 +71,6 @@ export class wsCache { this.listeners[slot].forEach(listener => { listener(data) }); - - console.info(this.slots); } /** diff --git a/yarn.lock b/yarn.lock index a2f5b4c..e548eaa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4030,6 +4030,13 @@ inferno-popper@^5.0.0: is-equal-shallow "^0.1.3" popper.js "^1.10.8" +inferno-redux@^5.0.6: + version "5.0.6" + resolved "https://verdaccio.blueclouds.io:4873/inferno-redux/-/inferno-redux-5.0.6.tgz#41214f3c3df2e75cc873f356f353e44e4b9c1c59" + dependencies: + hoist-non-inferno-statics "^1.1.3" + inferno-shared "5.0.6" + inferno-router@^5.0.1: version "5.0.5" resolved "https://registry.npmjs.org/inferno-router/-/inferno-router-5.0.5.tgz#3fb68a63e6fa4c9b27b7b87861b1c3fca67015b9" @@ -4045,6 +4052,10 @@ inferno-shared@5.0.5, inferno-shared@^5.0.1: version "5.0.5" resolved "https://registry.npmjs.org/inferno-shared/-/inferno-shared-5.0.5.tgz#44a59ec9640998e7244396b5c012fbd8f8e6ec91" +inferno-shared@5.0.6: + version "5.0.6" + resolved "https://verdaccio.blueclouds.io:4873/inferno-shared/-/inferno-shared-5.0.6.tgz#392ed65f910049204b826c4640f5c1bf45c68e84" + inferno-vnode-flags@5.0.5, inferno-vnode-flags@^5.0.1: version "5.0.5" resolved "https://registry.npmjs.org/inferno-vnode-flags/-/inferno-vnode-flags-5.0.5.tgz#378a7224f20bba312b71e8c495641fe585bed0ae"