4 ms·
Not sure if this is what you settled on, but I'd just initialize the state variable as null and then put it into the dependencies of a useEffect that fires when
by pcthrowaway 3y ago
Not sure if this is what you settled on, but I'd just initialize the state variable as null and then put it into the dependencies of a useEffect that fires when the variable is set
- verelo 3y agoIt’s a mix of that. This introduced a race condition and a frustrating rendering experience, but yeah it’s a flavour of this.