`store.dispatch` does not work in 1.2.2
See original GitHub issueAfter migrating to 1.2.2 store.dispatch
stopped working with the following error message:
Argument of type 'ThunkAction<void, CombinedState<{ auth: AuthState; }>, null, Action<string>>' is not assignable to parameter of type 'AnyAction'.
Property 'type' is missing in type 'ThunkAction<void, CombinedState<{ auth: AuthState; }>, null, Action<string>>' but required in type 'AnyAction'.
Dispathing through dispatcher from hook works fine though:
const dispatch = useDispatch();
...
dispatch(logOut()); // OK
I can’t use React Hooks in the axios interceptor, so I was using this:
import store from '../../store';
store.dispatch(logOut());
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Redux Dispatch Does Not Work - ADocLib
After migrating to 1.2.2 store.dispatch stopped working with the following error message: Argument of type 'ThunkAction null Action >' is. We can't call ......
Read more >Executing code after dispatch is completed while using ngrx
Quick answer : You can't. As you said, dispatch is asynchronous. What you should do is use @ngrx/effects. It's nearly the same as...
Read more >Troubleshooting | Redux
Sometimes, you are trying to dispatch an action, but your view does not update. Why does this happen? There may be several reasons...
Read more >Fragment - Android Developers
Declaring dependencies. To add a dependency on Fragment, you must add the Google Maven repository to your project. Read Google's Maven repository for...
Read more >Standard Practice for Emergency Medical Dispatch ...
1.1 This practice covers the function of the emergency medical dispatcher (EMD). This function is the prompt and accurate processing of ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@phryneas
Updated to
unknown
type and installed the sandbox… it seems to work 😉Thanks for your help, very clear and super pro… Amazing 😃
@phryneas,
Nope
Setting it to
unknown
does the job, but I’m not sure about the implications.