Skip to content

Commit f67cdb7

Browse files
committed
remove exhaustive-deps exception
1 parent e96dd85 commit f67cdb7

File tree

8 files changed

+8
-12
lines changed

8 files changed

+8
-12
lines changed

dist/useReduxSelectors.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ var useReduxSelectors = function useReduxSelectors(selectorMap) {
115115
callback();
116116
var unsubscribe = store.subscribe(callback);
117117
return unsubscribe;
118-
}, [store]); // eslint-disable-line react-hooks/exhaustive-deps
119-
118+
}, [store, forceUpdate]);
120119
return trapped.proxy;
121120
};
122121

dist/useReduxState.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ var useReduxState = function useReduxState() {
4949
callback();
5050
var unsubscribe = store.subscribe(callback);
5151
return unsubscribe;
52-
}, [store]); // eslint-disable-line react-hooks/exhaustive-deps
53-
52+
}, [store, forceUpdate]);
5453
var proxyCache = (0, _react.useRef)(new WeakMap()); // per-hook proxyCache
5554

5655
return (0, _deepProxy.createDeepProxy)(state, affected, proxyCache.current);

dist/useReduxStateRich.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ var useReduxStateRich = function useReduxStateRich() {
6565
callback();
6666
var unsubscribe = store.subscribe(callback);
6767
return unsubscribe;
68-
}, [store]); // eslint-disable-line react-hooks/exhaustive-deps
69-
68+
}, [store, forceUpdate]);
7069
return trapped.state;
7170
};
7271

dist/useReduxStateSimple.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ var useReduxStateSimple = function useReduxStateSimple() {
5353
};
5454

5555
return cleanup;
56-
}, [store]); // eslint-disable-line react-hooks/exhaustive-deps
57-
56+
}, [store, forceUpdate]);
5857
return new Proxy(state, handler);
5958
};
6059

src/useReduxSelectors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,6 @@ export const useReduxSelectors = (selectorMap) => {
9090
callback();
9191
const unsubscribe = store.subscribe(callback);
9292
return unsubscribe;
93-
}, [store]); // eslint-disable-line react-hooks/exhaustive-deps
93+
}, [store, forceUpdate]);
9494
return trapped.proxy;
9595
};

src/useReduxState.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const useReduxState = (opts = {}) => {
4848
callback();
4949
const unsubscribe = store.subscribe(callback);
5050
return unsubscribe;
51-
}, [store]); // eslint-disable-line react-hooks/exhaustive-deps
51+
}, [store, forceUpdate]);
5252
const proxyCache = useRef(new WeakMap()); // per-hook proxyCache
5353
return createDeepProxy(state, affected, proxyCache.current);
5454
};

src/useReduxStateRich.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ export const useReduxStateRich = () => {
6363
callback();
6464
const unsubscribe = store.subscribe(callback);
6565
return unsubscribe;
66-
}, [store]); // eslint-disable-line react-hooks/exhaustive-deps
66+
}, [store, forceUpdate]);
6767
return trapped.state;
6868
};

src/useReduxStateSimple.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ export const useReduxStateSimple = () => {
4646
used.current = {};
4747
};
4848
return cleanup;
49-
}, [store]); // eslint-disable-line react-hooks/exhaustive-deps
49+
}, [store, forceUpdate]);
5050
return new Proxy(state, handler);
5151
};

0 commit comments

Comments
 (0)