react-adaptive-hooks icon indicating copy to clipboard operation
react-adaptive-hooks copied to clipboard

Pick up updates triggered between render & useEffect

Open raibima opened this issue 4 years ago • 3 comments

useEffect isn't called synchronously after render. There's a slight chance a change event is dispatched after our initial read but before we register our listener in useEffect.

Timeline:

useState(initialValue) --- "change" event triggered --- useEffect (subscribe)

raibima avatar Jun 17 '20 16:06 raibima

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

googlebot avatar Jun 17 '20 16:06 googlebot

@googlebot I signed it!

raibima avatar Jun 17 '20 16:06 raibima

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

googlebot avatar Jun 17 '20 16:06 googlebot