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
In Angular2 often the UI does not get refreshed #43
Comments
Does this happen only with the extension, or can you reproduce this with vanilla Redux DevTools too? |
Sorry let me explain better... when I disable different store snapshots in the extension, I expect the UI to update, but it doesn't... but if I click on a button to force a change in the store and thus a re-rendering in ng2 via prop bindings, the state of the UI at that point will match my store |
@born2net, if you try to switch from "Autoselect instances" to that instance, does that help? Could you please share an example with Angular? So I would be able to reproduce it and also test when implementing new features? It could be a pull request to our examples or a separate branch. |
it didn't help... and sure, here is a small project you can use: The DevTool is already in the project so should be easy to debug... regards |
Just tried that example, I'm getting all changes instantly even when hovering the users. Did you try that example? Maybe in your case you have something different? |
let me explain, yes all changes register fine, but now try and time travel OR try and disable different store items in the DevTool widget's UI, and these changes do not update the UI |
I see, toggling actions has no effect there. Will investigate this tomorrow. Thanks for the report! |
let me add that 7 out of 10 times it will not work... BUT once in a while it will ... must be racing condition... and if you manually update the store it will push the onChange in ng2 and WILL update UI with the changes you did manually via DevTools, hope that helps. |
Could you please try it also with vanilla Redux DevTools to see if the problem is related only to the extension? |
this will work with ng2? and hot loading as well for ng2? |
It would've been possible to open it in a new window, which is rendered by React as in the example, but it's not that simple. I'll look into it tomorrow. |
got it, tx! |
Hey @born2net, Yes, it's the same with vanilla Redux DevTools, and actually, as you reported, everything works but the app's UI is updated only when you dispatch an action, even though the data is intact to the lifted state. You should make the UI react to the If you don't have time to fix the example with angular2-redux, you may use ng2-redux instead, which already has an example with Redux DevTools and should work well. |
tx for looking into this, but with Angular2 you can bypass the subscription and bind directly to the store via Getters, as in:
but in any case in that sample I do use:
and if I add a breakpoint, any time I use the DevTools time travel it does get to the subscribe method, so like you said, the store model functionality is working, but I am not sure why Angular2 is not re-rendering it, I did remove the onPush change detection but no luck... mmm... regards Sean |
I've updated the angular2-redux-example to create the app store inside a factory (instead of doing that statically before Angular bootstraps) and now it properly updates the UI. |
Great work Ruby! |
When using this plugin with ng2, often the UI does update,,,
The underline store gets updated, but I have to manually click on a button to force a change detection for the UI to re-render... it happens about 70% of the time...
regards
Sean
The text was updated successfully, but these errors were encountered: