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

Running sequence from a specific submodule #1389

Open
Nodios opened this issue Dec 15, 2018 · 6 comments
Open

Running sequence from a specific submodule #1389

Nodios opened this issue Dec 15, 2018 · 6 comments

Comments

@Nodios
Copy link
Contributor

Nodios commented Dec 15, 2018

I have a case where I want to run a sequence within a submodule. Is this an option?

I tried with app.runSequence() but it runs the sequence from the root module. This is the problem if you are using moduleState proxy in your sequences/actions since the moduleState will refer to a root module.

@christianalfoni
Copy link
Member

christianalfoni commented Feb 9, 2019

@Nodios Hi there!

You should be able to do: app.runSequence("myModule.someSequence"), does that not work? https://cerebraljs.com/docs/api/app.html#app-methods-runsequence

Please reopen if still an issue

@miraage
Copy link

miraage commented May 8, 2019

Having the same issue. Using moduleState refers to the root module

@christianalfoni
Copy link
Member

@Nodios @miraage You able to create a small Codesandbox reproducing the issue? That helps me a lot to get into the issue and fix it :)

@Nodios
Copy link
Contributor Author

Nodios commented Jun 17, 2019

I'll do my best to do it this week @christianalfoni

@christianalfoni
Copy link
Member

Not been able to look at this for next release, please let me know if it still an issue and I can have a look. So issue is that the sequence uses moduleState, but when run fro runSequence it is not pointing to its module, but the root?

@christianalfoni
Copy link
Member

I believe this might be fixed here? #1408

At least an update related to this in next release

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

3 participants