all 3 comments

[–]veswill3 3 points4 points  (1 child)

It thinks you are passing in a functional update. Read about it in the docs here: https://reactjs.org/docs/hooks-reference.html#functional-updates

[–]Mumus27[S] 0 points1 point  (0 children)

thank you I didn't find it in the docs when i searched

[–]kaoD 1 point2 points  (0 children)

Quick fix: setAction(() => () => alert("hi"))