File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -384,14 +384,14 @@ TypeScript Example
384384
385385const model: NextModelType <StateType , ActionsParamType > = {
386386 actions: {
387- increment : async (s , _ , params ) => {
387+ increment : async (params , { state : s } ) => {
388388 // issue: https://github.com/Microsoft/TypeScript/issues/29196
389389 // async function return produce need define type manually.
390390 return (state : typeof s ) => {
391391 state .counter += params || 1
392392 }
393393 },
394- decrease : ( s , _ , params ) => s => {
394+ decrease : params => s => {
395395 s .counter += params || 1
396396 }
397397 }
@@ -405,7 +405,7 @@ JavaScript Example
405405``` js
406406const Model = {
407407 actions: {
408- increment: async ( s , _ , params ) => {
408+ increment: async params => {
409409 return state => {
410410 state .counter += params || 1
411411 }
You can’t perform that action at this time.
0 commit comments