What am I doing wrong? I have like three other async actions that have the same issue and can't fix it.
相关问题
- Redux action dispatch not working
- “No reducer provided for key X” console.error in r
- How does react decide to rerender a component
- Typescript: Why doesn't visual studio code rep
- How to access the redux store within the redux for
相关文章
- Cannot find module 'redux' 怎么解决?
- eslint Parsing error: Unexpected token =
- Static elements interactions
- redux-saga: How to create multiple calls/side-effe
- withNavigation can only be used on a view hierarch
- How to set a test for multiple fetches with Promis
- ESLint: Require statement not part of import state
- Apollo Client Cache vs. Redux
When you take a look at the Arrow Function Documentation
the "Unexpected block statement surrounding arrow body" just means that you don't need a
{ return expression; }
block for your arrow function here, as the arrow function does return by default.is equivalent to
and therefore the block statement is unnecessary
Not recommended:
You can always disable the arrow-body-style rule or configure it in a way that it doesn't give such errors.
Recommended:
This basically means that we don't have to write
{ return
thing when we are only returning w/o doing anything else