weechatRN

Weechat relay client for iOS using websockets https://github.com/mhoran/weechatRN
git clone http://git.hanabi.in/repos/weechatRN.git
Log | Files | Refs | README | LICENSE

commit 37c80c3744015caf959bc00656dd6289a6c33335
parent f5db0c711471c25f346db0e15e1189a0950a498c
Author: Johan Lindskogen <johan.lindskogen@gmail.com>
Date:   Sun,  1 Apr 2018 22:30:22 +0200

Add thunk

Diffstat:
Mpackage.json | 6++++--
Msrc/store/index.ts | 11++++++++---
Myarn.lock | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 66 insertions(+), 5 deletions(-)

diff --git a/package.json b/package.json @@ -17,7 +17,8 @@ "react-native-drawer": "^2.5.0", "react-native-parsed-text": "^0.0.20", "react-redux": "^5.0.7", - "redux": "^3.7.2" + "redux": "^3.7.2", + "redux-thunk": "^2.2.0" }, "devDependencies": { "@types/react-native": "^0.52.21", @@ -28,7 +29,8 @@ "react-native-typescript-transformer": "^1.2.3", "react-test-renderer": "^16.3.0-alpha.1", "tslib": "^1.9.0", - "typescript": "^2.8.1" + "typescript": "^2.8.1", + "why-did-you-update": "^0.1.1" }, "jest": { "preset": "react-native" diff --git a/src/store/index.ts b/src/store/index.ts @@ -1,4 +1,5 @@ -import { combineReducers, createStore, applyMiddleware } from "redux"; +import { compose, combineReducers, createStore, applyMiddleware } from "redux"; +import thunk from "redux-thunk"; import buffers, { BufferState } from "./buffers"; import lines, { LineState } from "./lines"; @@ -45,8 +46,12 @@ const reducer = combineReducers({ hotlists }); -export default createStore( - reducer, +const middleware = applyMiddleware(thunk); + +const enhancers = compose( + middleware, (<any>window).__REDUX_DEVTOOLS_EXTENSION__ && (<any>window).__REDUX_DEVTOOLS_EXTENSION__() ); + +export default createStore(reducer, enhancers); diff --git a/yarn.lock b/yarn.lock @@ -3388,6 +3388,14 @@ lodash.escape@^3.0.0: dependencies: lodash._root "^3.0.0" +lodash.every@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.every/-/lodash.every-4.6.0.tgz#eb89984bebc4364279bb3aefbbd1ca19bfa6c6a7" + +lodash.filter@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" + lodash.isarguments@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" @@ -3396,6 +3404,18 @@ lodash.isarray@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + +lodash.isfunction@^3.0.8: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051" + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + lodash.keys@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" @@ -3404,6 +3424,10 @@ lodash.keys@^3.0.0: lodash.isarguments "^3.0.0" lodash.isarray "^3.0.0" +lodash.keys@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.2.0.tgz#a08602ac12e4fb83f91fc1fb7a360a4d9ba35205" + lodash.pad@^4.1.0: version "4.5.1" resolved "https://registry.yarnpkg.com/lodash.pad/-/lodash.pad-4.5.1.tgz#4330949a833a7c8da22cc20f6a26c4d59debba70" @@ -3416,10 +3440,18 @@ lodash.padstart@^4.1.0: version "4.6.1" resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" +lodash.pick@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + lodash.restparam@^3.0.0: version "3.6.1" resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" +lodash.some@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" + lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -3449,6 +3481,10 @@ lodash.throttle@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" +lodash.union@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" + lodash@^3.5.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" @@ -4449,6 +4485,10 @@ realpath-native@^1.0.0: dependencies: util.promisify "^1.0.0" +redux-thunk@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.2.0.tgz#e615a16e16b47a19a515766133d1e3e99b7852e5" + redux@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b" @@ -5390,6 +5430,20 @@ which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0: dependencies: isexe "^2.0.0" +why-did-you-update@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/why-did-you-update/-/why-did-you-update-0.1.1.tgz#c73d361511fecd899056e9954ca9b1ab760d3097" + dependencies: + lodash.every "^4.6.0" + lodash.filter "^4.6.0" + lodash.isequal "^4.5.0" + lodash.isfunction "^3.0.8" + lodash.isstring "^4.0.1" + lodash.keys "^4.2.0" + lodash.pick "^4.4.0" + lodash.some "^4.6.0" + lodash.union "^4.6.0" + wide-align@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710"