-
Notifications
You must be signed in to change notification settings - Fork 401
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃殌[FEATURE]: Lazy load sub states #2029
Comments
We're planning to drop sub states support in the future thus no more work is going to be done on their extensibility for now. |
Mind if I ask you the reason for such a decision? Will there be an alternative way to structure states by logic? |
If there is a plan to drop sub states in the long term, then it would be good to see a note in the documentation that sub states are deprecated. The reasons are of course still important to communicate |
Description
Add possibility to lazy load sub statesDescribe the problem you are trying to solve
Currently when having a parent state, in order to load sub state to it we need to provide in
@State
's config the children array of the desired child state.While this works, we are eagerly load NoteState and TaskState, and if we open the devTools we can see the following structure:
However, say if we want NoteState to be lazily loaded when user visit /notes page, it is not possible with current approach. Because the way we can lazy load a state is:
By doing this, notes state will appear as a sibling of
leadsState
(assuming we have removed them from LeadState children array.)Describe the solution you'd like
Somehow to specify Lazily which is the parent state of the SubState. One possible solution would be:In the end, only when accessing /notes path, noteState should appear as a child state of leadState
The text was updated successfully, but these errors were encountered: