You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 23, 2020. It is now read-only.
If multiple states are "lazy-loaded" via LoonaModule.forChild, only the latest module import will initialize a child state. This is caused because CHILD_STATE is provided with multi: false option, therefore every call of LoonaModule.forChild will override previous values.
This happens if you have for example multiple feature modules which are imported by the app root module and each of the feature module holds a state by using LoonaModule.forChild.
This can be solved by providing CHILD_STATE with multi: true and changing the effect initialization code inside LoonaChildModule to handle multiple state groups.
🐞 bug report
Affected Package
@loona/angular: 1.0.0
Description
If multiple states are "lazy-loaded" via
LoonaModule.forChild
, only the latest module import will initialize a child state. This is caused becauseCHILD_STATE
is provided withmulti: false
option, therefore every call ofLoonaModule.forChild
will override previous values.This happens if you have for example multiple feature modules which are imported by the app root module and each of the feature module holds a state by using
LoonaModule.forChild
.This can be solved by providing
CHILD_STATE
withmulti: true
and changing the effect initialization code insideLoonaChildModule
to handle multiple state groups.But this will propaply cause some side-effects because states are instanciated multiple times.
🌍 Your Environment
Angular Version:
The text was updated successfully, but these errors were encountered: