Createch_472
ESLint error "Promise-returning function provided to attribute where a void return was expected"
I have a
createResource
and I'm trying to refetch it on button click:
However, ESLint gives me the error Promise-returning function provided to attribute where a void return was expected
for the onClick
handler. I found that this could be solved by doing something like onClick={() => void refetchNum()}
, but is there a better way to handle this?1 replies