I'm observing a new syntax I haven't seen before in the react useState hook. It's
const [thing, setThing] = useState(thing || otherThing);
I've never seen that or construction used inside of useState before. I know it is a javascript native logic operator, but I'm curious exactly how to interpret it inside the context of useState.
Does it essentially mean, "if either of these things are true, set it to thing? " Is it assuming both of them can never be true at the same time?