monokle icon indicating copy to clipboard operation
monokle copied to clipboard

Refactor main and config redux slices

Open devcatalin opened this issue 2 years ago • 1 comments

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.

devcatalin avatar Apr 07 '22 09:04 devcatalin

I will finish this issue after the work on OPA Validation is done to avoid having many conflicts.

devcatalin avatar Apr 21 '22 13:04 devcatalin