v3.2.1 type error: An argument for 'payload' was not provided.
See original GitHub issuei have a storeAction that does not receive a payload.
but i can’t call that now without an argument:
const increaseBenefitsNavCounter = useStoreActions(
(s) => s.navigation.increaseBenefitsNavCounter,
);
// later
increaseBenefitsNavCounter(); // <<--- type error
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
An argument for 'payload' was not provided. error in ...
I get the following if i replace that line: (1)Cannot find name 'payload'. (2) Property 'subscribe' does not exist on type 'void'. –...
Read more >An argument for 'X' was not provided in TypeScript | bobbyhadz
The error "An argument for 'X' was not provided" occurs when we don't provide a value for a required parameter when calling a...
Read more >Error A case reducer on a non-draftable value must not return ...
I'm trying to import typescript in my redux application. I use redux toolkit createSlice function like this:
Read more >Quickstart — Requests 2.28.1 documentation
Quickstart¶. Eager to get started? This page gives a good introduction in how to get started with Requests. First, make sure that: Requests...
Read more >GraphQL specification
Finally, oftentimes it is useful to provide complex structs as inputs to GraphQL field arguments or variables; the Input Object type allows the...
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

oops, i found the problem. In this project we have very simple local state, so i did not notice it:
we derived
typeof’d part of the state, personally I prefer to not repeat literals 😉This looks like this:
I now change slightly, which is clearer:
now typechecks work properly!
I just testing this in 3.6.4 and 3.7.2 and couldn’t reproduce the error.
Did you restart you TS server?