File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 5
5
- Remove experimental useReduxStateMapped
6
6
### Changed
7
7
- useLayoutEffect and keep latest state after update (see #20 )
8
+ - useForceUpdate uses counter instead of boolean (see #20 )
8
9
9
10
## [ 1.8.0] - 2019-04-02
10
11
### Changed
Original file line number Diff line number Diff line change @@ -29,11 +29,11 @@ var warningObject = {
29
29
var ReduxStoreContext = ( 0 , _react . createContext ) ( warningObject ) ; // helper hooks
30
30
31
31
var forcedReducer = function forcedReducer ( state ) {
32
- return ! state ;
32
+ return state + 1 ;
33
33
} ;
34
34
35
35
var useForceUpdate = function useForceUpdate ( ) {
36
- return ( 0 , _react . useReducer ) ( forcedReducer , false ) [ 1 ] ;
36
+ return ( 0 , _react . useReducer ) ( forcedReducer , 0 ) [ 1 ] ;
37
37
} ;
38
38
39
39
var useProxyfied = function useProxyfied ( state ) {
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ const ReduxStoreContext = createContext(warningObject);
31
31
32
32
// helper hooks
33
33
34
- const forcedReducer = state => ! state ;
35
- const useForceUpdate = ( ) => useReducer ( forcedReducer , false ) [ 1 ] ;
34
+ const forcedReducer = state => state + 1 ;
35
+ const useForceUpdate = ( ) => useReducer ( forcedReducer , 0 ) [ 1 ] ;
36
36
37
37
const useProxyfied = ( state ) => {
38
38
// cache
You can’t perform that action at this time.
0 commit comments