I cant figure out how can update state from server after i delete something from db.
ACTION -> Delete user -> REDUCER -> REDUCER-REDUX ( After this i want to Call another action that will get all users so state updates )
ACTION -> getAllUsers -> REDUCER -> REDUCER-REDUX
You could have one action creator that does two ajax calls: deleteUser and getAllUsers. With Redux Thunk middleware you can dispatch many actions from the same reducer.
The book Developing a Redux Edge has an effective way of doing this. The code is available on GitHub
You do not need to reload all users when you delete one of them, you can remove it from the store with the reducer.
By the way I cant figure out your example.
Which step is the “ajax” call?
What is REDUCER-REDUX?