Closed criticalbh closed 7 years ago
Lets say we have: ACTION1 ACTION1_SUCCESS ACTION2 ACTION2_SUCCESS
ACTION1
ACTION1_SUCCESS
ACTION2
ACTION2_SUCCESS
ACTION1 is dispatched and activate effects to load data for action1. ACTION2 is dispatched and it activates effect to load data for action2.
ACTION2_SUCCESS is dispatched since ACTION2 finished first.
now when ACTION1_SUCCESS is dispatched it puts back the state of ACTION2_SUCCESS to previous state.
Could anyone please give me some ideas why this happens?
Please take a look at photo: '--- | --- | ---' is subscription to selector.
'--- | --- | ---'
Forget please
default: { return initialState; }
Lets say we have:
ACTION1
ACTION1_SUCCESS
ACTION2
ACTION2_SUCCESS
ACTION1
is dispatched and activate effects to load data for action1.ACTION2
is dispatched and it activates effect to load data for action2.ACTION2_SUCCESS
is dispatched sinceACTION2
finished first.now when
ACTION1_SUCCESS
is dispatched it puts back the state ofACTION2_SUCCESS
to previous state.Could anyone please give me some ideas why this happens?
Please take a look at photo:
'--- | --- | ---'
is subscription to selector.