-
I've read "My function value is constant" from https://github.com/facebook/react/issues/14920#issuecomment-471070149.
> There is a problem on the opposite spectrum of this, which is where you get i…
-
One thing I like about the hooks `useReducer` is that the signature looks like `('state, 'action) => 'state`, where `'state` is the first argument. This allows you to do, e.g.:
```reason
let (stat…
-
Have we discussed using `useReducer` instead of `useState` with an object for this? For this specific form it's OK, but if we had more fields maybe `useReducer` hook would make it more readable, since…
-
I am trying to get updates from API, e.g. new post? But unfortunately it doesn't return any data, it always returned null value.
-
-
**Current behavior**
We are supposed to do
```js
useEffect(()=> {
loadData()
}, [])
```
to mock the behavior of `didMount` life cycle. But this keeps giving me warning:
```
React Hook us…
-
- [x] existing app components refactored to use hooks
- [x] if any hooks other than setState or useEffect are used, documentation is written in this issue with links or an explanation
-
*useReducer* can be used for local state management. And *dispatch* produced by *useReducer* can be used locally or inside underlying components.
But sometimes it would be nice to "connect" arbitra…
-
> Warning: State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffec…
-
Given an initialized useMethods
```
const [ productReviewState, stateChangers ] = useMethods(...);
```
And an updater like the following:
```
updateAnswer: ({ questionId, value, isVa…