New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simultaneous emit #2602
Comments
Hi @railsonsm 👋 I'm guessing the state is not changing because it is being mutated. Check out the FAQs for more information and if you're still having trouble please provide a minimal reproduction sample that illustrates the issue, thanks! |
Thank you for the quick response. I uploaded a project to git to show the mentioned scenario. As in my project, I also didn't have the RecordDataState emit |
@railsonsm your model should also extend |
@narcodico I had already taken this test. Wouldn't it take different instances to emit a new state? |
You need to always emit a new instance rather than mutating the existing state. If you want different instances of state with the same values to trigger state changes (and rebuilds) then you should avoid extending Let me know if that helps 👍 |
Closing for now but feel free to comment with additional questions and I'm happy to continue the conversation 👍 |
Oops @felangel! I came back here haha. I continued with the scenario pointed out above, but going back to this subject I ended up finding this question. By placing a delay, emits occur as expected. Is there any barrier on the block that prevents it from issuing states so fast? my code: `
` |
Hello everybody.
I have a scenario here and would like your help. I'm putting together a page where I have a loader that shows when loading data. Soon after the data is loaded, the load is expected to disappear. The problem is that the emit with the data is not running.
`emit(RecordLoadState());
`
The RecordDataState not emit
The text was updated successfully, but these errors were encountered: