monokle
monokle copied to clipboard
Refactor main and config redux slices
In many reducers from the main slice we required some information from the config slice.
This led to complicated workarounds and a refactor of some of the actions to thunks. The problem with these thunks is that they are doing operations that should be completed in a sync way, while they are running async. This leads to state being reverted back if there are actions dispatched while a thunk is fulfilled.
The better solution would be to merge the main
and config
slices into a single slice.
But, this will make the reducers/main
file to grow even larger. We have to find a way to split it into multiple files.
I will finish this issue after the work on OPA Validation is done to avoid having many conflicts.