Unofficial Redux Hooks Libraries
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

View only
 
ABCDEFGHIJKLMNOPQRSTUVWXY
1
NameRepoStarsDLsAPINotes
2
redux-react-hook
facebookincubator/redux-react-hook
13928563const {canDelete, name} = useMappedState(mapState);

const dispatch = useDispatch();


// Note that we pass the index as a dependency parameter -- this causes
// useCallback to return the same function every time unless index changes.
const mapState = useCallback(state => state.todos[index], [index]);
const todo = useMappedState(mapState);
Investigate use of multiple useMappedState calls:
https://github.com/facebookincubator/redux-react-hook/issues/12

Equivalent for `ownProps`:
https://github.com/facebookincubator/redux-react-hook/issues/14

High level API discussion: do we even need useMappedState?
https://github.com/facebookincubator/redux-react-hook/issues/39
3
easy-peasyctrlplusb/easy-peasy14322255useStore(mapState, externals)
const totalPrice = useStore(state => state.basket.totalPrice);

const addTodo = useActions(actions => actions.todos.add);

const dispatch = useDispatch();
Temp hack for working around "stale props" issue - catch errors in mapState, wait 200ms, only throw error if not unmounted:

https://github.com/ctrlplusb/easy-peasy/pull/138
4
@epeli/redux-hooksepeli/redux-hooks89843useMapState() // Renders when returned value differ using Object.is() check
useSelect() // Renders when returned value differ using shallow equal check
useActionCreators() // Bind object of action creators to dispatch
useDispatch() // Returns the plain dispatch-function
usePassiveMapState() // Like useMapState() but does not subscribe to the store eg. is executed only when the component renders.
TS
5
use-reduxflepretre/use-redux54303const [ state, dispatch ] = useRedux();

const [ v1, v2, a1, a2 ] = useRedux([v1Selector, v2Selector], [a1Creator, a2Creator]);

const [ v1, v2 ] = useSelectors(v1Selector, v2Selector);

const [ set, reset ] = useActionCreators(setCreator, resetCreator);
6
reactive-react-reduxdai-shi/reactive-react-redux135129const state = useReduxState();
const dispatch = useReduxDispatch();
Proxy-based - tracks state access via Proxies to try to optimize updates
7
@nvd/use-reduxnickvdyck/use-redux0112
8
react-use-duxrichardpj/react-use-dux394
9
react-hooks-reduxymzuiku/react-hooks-redux1490
10
redux-bundler-hookabuinitski/redux-bundler-hook777
11
use-substatephilipp-spiess/use-substate8376
12
use-restateanimify/useRestate751
13
redux-react-hooksGarethSmall/react-redux-hooks146
14
@redux-up/hookstakion/redux-up-hooks045
15
react-glue-redux-hook
ZhouYK/react-glue-redux-hook029
16
react-use-reduxmartynaskadisa/react-use-redux2627
17
redux-hooksgretzky/redux-hooks120
18
react-redux-hooksjessy1092/react-redux-hooks815
19
redooxjake-daniels/redoox914
20
@gostgroup/use-redux
gostgroup/use-redux511
21
huxDzoQiEuoi/hux310
22
use-redux-storefbarrailla/use-redux-store110
23
redux-hookedBhoos/redux-hooked010
24
use-connectdancerphil/use-connect19
25
redux-hookerlinde12/redux-hooker09
26
react-state-treesuchipi/react-state-tree678
27
react-reduckxphixo/react-reduckx15
28
react-redux-peachborvelt/react-redux-peach54
29
rrhbrn/rrh86
30
useReduxStateJesseChrestler - sandbox00
31
useReduxFactorybaetheus - gist
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...