unstable_deferredUpdates is removed from react, replace with rAF#159
unstable_deferredUpdates is removed from react, replace with rAF#159ryanflorence merged 1 commit intoreach:masterfrom stipsan:patch-2
Conversation
|
@stipsan is this better than following the schedule package? I know the API is unstable and subject to change but maybe better to stay closer to that as this is going to be the suggested way to Example from react time-slicing demo: |
No, the schedule package is probably better since it's essentially polyfilling But I have not tested it and the readme for the fixture you're referring to suggest that there might be some issues they haven't solved yet: https://github.com/facebook/react/tree/master/fixtures/unstable-async/time-slicing#can-i-use-this-code-in-production Another facebook team also went with |
|
I came across an issue using Please note that overwritting the Thanks @stipsan! Now it would be great to see that PR merged and RIP React Router! |
|
I use rAF for scheduling focus after render in @reach/menu-button, too. thanks! |
See facebook/react#13488
Both
requestIdleCallbackandrequestAnimationFrameare suggested as alternatives until the API is ready. I went withrequestAnimationFramesince react already expect you to polyfill it.