-
Notifications
You must be signed in to change notification settings - Fork 46
Warning: unstable_flushDiscreteUpdates #40
Comments
Looks like it has something to do with the focus calls based on this code comment: https://github.com/facebook/react/blob/c80678c7606b1895573c23182bfb9a418e2ad31e/packages/react-reconciler/src/ReactFiberWorkLoop.js#L605-L607 I'm not sure how to address this. |
What is happening with this issue guys ? |
No one has picked up this issue if you want to take it. Just a warning so not a top concern. |
We are full of warnings bro |
In my private fork I have replaced A hack, no doubt, but seems to be working so far,,, |
@vitaly-redkin Can you please make a pull request for that ? :) Thank you |
I probably can but what is the point? The PR to use UNSAFE_ methods for componentWillXXX (#46) is not merged - and probably will not. My local version has both UNSAFE_ and "wrap this.focusedControl.focus() into setTimeout()" changes so it will break the same tests as the previous PR did. So it will not be merged, etc. Personally I made my change to serve as a temporary solution and waiting for the hooks rewrite... |
Yes i understand . How about you pull reuqest only the wrap this.focusedControl.focus() into setTimeout() , i am having that annoying errors in production code . |
Will do but a bit later - really tied up right now... |
@vitaly-redkin No prob fill free to drop a pull request when you have time :) |
any updates here ? |
@Adam-Asatryan Vitaly got married i think. |
Will there be any progress? |
No it’s Christmas 🎄 |
😂 😂 😂 😂 😂 😂 😂 😂 😂
I am making bug fixes right now bro for an app.
…On Wed, 25 Dec 2019, 19:05 Kyle Gray, ***@***.***> wrote:
No it’s Christmas 🎄
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#40?email_source=notifications&email_token=AE3OFQCUN2I4N4KSMW6TF3LQ2OHFTA5CNFSM4IODXYEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHUPUJY#issuecomment-568916519>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE3OFQBYLGRVE5UP3S3EXP3Q2OHFTANCNFSM4IODXYEA>
.
|
I use BlockUi with redux-saga to block screen when fetching data from back-end. |
Yeah, I'm experiencing the same thing |
@Joe-Cristop it's happening because the dom (in this case x.focus()) is being manipulated outside of react before react has time to finish its rendering process. Adding a slight delay is why the timeout works in most cases. I had a similar issue on unrelated code but google lead me here. I was able to fix a similar issue in my code using the useEffect hook with the proper dependencies. However, this looks to be a class so calling the focus in the appropriate render stage (didmount/updated/ etc) with the appropriate condition check should eliminate the error. my og code with the error updated code without error I don't use this library and Idk what is calling your update but maybe this helps y'all out. |
A fix to this would be welcome |
I'm getting the same issue in 1.3.3. Are there any fix? |
I found why it is happening; in my case below; My so simple example;
|
"react-block-ui": "^1.3.3" has the same issue, any update? |
Did anyone find the solution to this issue? I am using "react-block-ui": "^1.3.3" |
I don't have a repro - but based on the above example the issue may be that you're calling |
For react deps:
There is now this warning showing up
The text was updated successfully, but these errors were encountered: