When using the useState
hook, typically the two destructured array variables take the form: foo
and setFoo
.
Some examples that deviate from this template are:
const [foo, setfoo] = useState();
const [foo, updateFoo] = useState();
const [foo, fooSetter] = useState();
During code review, I would recommend the above examples be changed to:
const [foo, setFoo] = useState();
Is there a way of statically checking (ESLint) for this situation?