1
votes

I'm new to ngrx. I'm little confused in dispatching actions.

State{
uiState: UIState,
featureState: FeatureState
}

From my feature effects, I need to dispatch a UI action. So, I injected Store and dispatch. It worked fine.

But, if I use Store and dispatch UI action, this also worked fine.

I thought, If I dispatch a UI action from feature store, store will not know which reducer to call for that action and get a default state. But the value in the uistate is updated.

So, can I dispatch any action from anywhere??

1

1 Answers

2
votes

Yes - you can dispatch any action from anywhere.