You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redhooks is tiny React utility library for holding a predictable state container in your React apps.
4
-
Inspired by https://redux.js.org, it reimplements reduxjs concept using the experimental Hooks API and the Context API.
4
+
Inspired by [Redux](https://redux.js.org), it reimplements redux concept by using the experimental Hooks API and the Context API.
5
5
6
6
-[Motivation](#motivation)
7
7
-[Basic Example](#basic-example)
@@ -21,7 +21,7 @@ npm install --save redhooks
21
21
22
22
# Motivation
23
23
24
-
In the https://reactjs.org/docs/hooks-custom.html docs a nice paragraph titled useYourImagination() suggests to think on differents possible usages of the Hooks, this essentially is what Redhooks tries to do.
24
+
In the [Reactjs docs](https://reactjs.org/docs/hooks-custom.html)a nice paragraph titled useYourImagination() suggests to think on differents possible usages of the Hooks, this essentially is what Redhooks tries to do.
25
25
Redhooks does not use any third party library, it only depends on the new Hooks and the Context API.
26
26
You do not need to install `react-redux` to connect your components to the store because you can have access to it directly from any of your function components by calling `useStore` Redhooks api.
27
27
Hooks are not allowed within class Components, for using the store within them Redhooks exposes a HOC named `connect`.
`createStore` returns the store object to be passed to the `<Provider store={store} />`.
368
-
* The `reducer` argument is the is your reducer function or a function returned by `combineReducers` if your
369
-
store needs more then one reducer.
372
+
* The `reducer` argument might be a single reducer function, a function returned by `combineReducers` or a plain object whose values are reducre functions if your store needs multiple reducers.
370
373
* The `opts` optional argument is an object which allows you to pass a `preloadedState`, `initialAction` and `middlewares`.
371
374
> The store is ready after the Provider is mounted, an `onload` event will be triggered at that time.
0 commit comments