We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
addModule
I noticed that when adding a module definition that has some reactions defined, the reaction handlers are not firing. Digging deeper i have found out that reactions are created with .create() method https://github.com/cerebral/cerebral/blob/next/packages/node_modules/cerebral/src/Module.js#L120 but they're not initialized. Initialization (with .initialize() method) happens only on https://github.com/cerebral/cerebral/blob/next/packages/node_modules/cerebral/src/Controller.js#L51 root module/controller creation only for statically defined modules. Dynamically added modules with addModule don't get initialized (similarly removeModule should destroy them i believe). This is contrary to reactions in views https://github.com/cerebral/cerebral/blob/next/packages/node_modules/cerebral/src/View.js#L251 which are initialized upon creation and destroyed when unmounting: https://github.com/cerebral/cerebral/blob/next/packages/node_modules/cerebral/src/View.js#L145.
.create()
.initialize()
removeModule
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I noticed that when adding a module definition that has some reactions defined, the reaction handlers are not firing. Digging deeper i have found out that reactions are created with
.create()
method https://github.com/cerebral/cerebral/blob/next/packages/node_modules/cerebral/src/Module.js#L120 but they're not initialized. Initialization (with.initialize()
method) happens only on https://github.com/cerebral/cerebral/blob/next/packages/node_modules/cerebral/src/Controller.js#L51 root module/controller creation only for statically defined modules. Dynamically added modules withaddModule
don't get initialized (similarlyremoveModule
should destroy them i believe).This is contrary to reactions in views https://github.com/cerebral/cerebral/blob/next/packages/node_modules/cerebral/src/View.js#L251 which are initialized upon creation and destroyed when unmounting: https://github.com/cerebral/cerebral/blob/next/packages/node_modules/cerebral/src/View.js#L145.
The text was updated successfully, but these errors were encountered: