Skip to content
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

action dispatched might fires before associated effect is fully loaded #352

Closed
rernens opened this issue Sep 6, 2017 · 1 comment
Closed

Comments

@rernens
Copy link

rernens commented Sep 6, 2017

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[x] Support request

What is the current behavior?

After converting angular-advanced-seed to use @ngrx v4, the multilingual service which uses @ngrx to handle language state change works just fine.

When expanding the seed with additional modules, components, reducers and effects, the multilingual module fails to handle initial translation properly because the multilingual effect associated with language change action is not initially triggered due to timing issue : the change language action is dispatched before the multilingual effect is instantiated and ready.

Expected behavior:

Expanding an application should not affect instantiation of effects or action dispatch should wait for all effects to be ready for use.

Minimal reproduction of the problem with instructions:

Version of affected browser(s),operating system(s), npm, node and ngrx:

see issue #351

Other information:

using setTimeout to delay the initial dispatch of the change Language action for browser language fixes the issue but is not safe.

@brandonroberts
Copy link
Member

Duplicate of #246

@brandonroberts brandonroberts marked this as a duplicate of #246 Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants