I'll bite... useState should be used with [needsTacos, setNeedsTacos] first off... since the whole purpose is to be able to manage the state. One is a constant value which never changes. So I feel like this is a trick question or I totally misunderstood it.
Right? I havent found a reason to use
const [variableOnly] = useState()
const [,setterOnly] = useState()
I just thought it was a fun thinking exercise.
It is a fun thinking exercise, because I was racking my brain to see if i was missing something. It also leads in to letting others know that, yes you may think it's an option, but it's not the proper use. So maybe someone will see this and have the questions answered. Thumbs up!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.