Whenever I use useState
or a similar function with the same structure, I receive a lint error if I only need to use of the array functions, for example:
const [searchParams, setSearchParams] = useSearchParams();
If I only need to use setSearchParams
, but not searchParams
, lint will show an error that the first one is never used.
Replacing searchParams
with null or undefined will throw other errors instead. Is there a way to fix this in the syntax? (Without changing lint configuratios)