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

prevent signals ran in sync with modulesLoaded event if there was remembering #10

Open
Guria opened this issue Feb 2, 2016 · 4 comments

Comments

@Guria
Copy link
Contributor

Guria commented Feb 2, 2016

No description provided.

@Guria Guria changed the title prevent signals ran in syn with modulesLoaded event if there was remembering prevent signals ran in syn with modulesLoaded event if there was rememberingc Feb 2, 2016
@Guria Guria changed the title prevent signals ran in syn with modulesLoaded event if there was rememberingc prevent signals ran in syn with modulesLoaded event if there was remembering Feb 2, 2016
@Guria Guria changed the title prevent signals ran in syn with modulesLoaded event if there was remembering prevent signals ran in sync with modulesLoaded event if there was remembering Feb 2, 2016
@christianalfoni
Copy link
Contributor

Is the scenario here suing componentWillMount with React? So you can not run a signal when your app loads? Or is it a different scenario?

@Guria
Copy link
Contributor Author

Guria commented Feb 14, 2016

I need to remember my initial intention. Wondering why I haven't added details. Anyway there is a chance that things changed now :)

@christianalfoni
Copy link
Contributor

Hehe, issue title is like post-its. Makes sense when you write them, but 2 days later... its gone, hehe :) Remembered it now?

@Guria
Copy link
Contributor Author

Guria commented Apr 26, 2016

from discord:

ohh, I have remembered why triggering on component mount is bad
just reread my own documentation again :)
the reason it can break remembering with devtools(edited)
at least it will be unnecessary signal run

See the way how to deal with it from router documentation

function init () {
  controller.getSignals().app.appStarted({}, { immediate: true });
}

controller.once('predefinedSignal', function () {
  controller.removeListener('modulesLoaded', init)
})

controller.once('modulesLoaded', init)

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