Child states being undefined #2181
Replies: 2 comments 4 replies
-
@necronflux101 It is quite difficult to determine the issue from your examples. That being said, child states are actually marked for deprecation in NGXS v18. |
Beta Was this translation helpful? Give feedback.
-
Out of interest, can you share the scenario you want to use child states for? |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I have an issue with Child state declaration that runs into a runtime error in the browser,
I have a state that has multiple children:
this is lazy loaded via a forFeature in the imports of a module like this:
It compiles okay. But in the browser I get the following error:
when i check the sources i can see that the ParentStore did not load on the child stores correctly:
I have removed all instances of
@Select
from the module and its dependent, solely usingthis.store.select
.I have tried moving the states to the forRoot too.
The same seems to work if i set the parent to have no children:
and keep the forFeature the same.
Been hammering at this for quite some time and going through known issues, is there any way i can keep using the children and get it to load correctly ?
Beta Was this translation helpful? Give feedback.
All reactions