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
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:
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: