Closed bergi9 closed 6 years ago
By design there is only one state.
If i use nested states i often get TS errors for possible undefined values. To workaround it i use if checks but that's repetive way.
if
I didn't found a way to have multiple states like:
@store() export class FooStore { @action() foo(state:FooState, action: FooAction): FooState { ... } @action() bar(state:BarState, action: BarAction): BarState { ... } }
Any suggestions?
@bergi9, StateX is designed to work with single state. If you can share the snippet of code with your problem, I might be able to suggest how to fix.
By design there is only one state.
If i use nested states i often get TS errors for possible undefined values. To workaround it i use
if
checks but that's repetive way.I didn't found a way to have multiple states like:
Any suggestions?