codecharta icon indicating copy to clipboard operation
codecharta copied to clipboard

Refactor Improve event data flow for restoring state

Open Hall-Ma opened this issue 3 years ago • 0 comments

Feature request

Description

We should refactor the way we set the state of the store when a custom config is applied. Currently the properties of appsettings, dynamicsettings, filesettings etc. are restored through their splitter functions. This leads to redundant code and it's also easy to forget to create new splitter functions when the properties of the Custom Configs change. The consequence is that the Custom Config is not fully applied.

The solution is to write a new root reducer that takes care about the new state (comming from the Custom Config) and only the reducer has to know how the state is set. After that we can delete all splitter function. As additional advantage, only one action is fired instead of an action for every field in store

Acceptance criteria

  • All splitter related code is deleted
  • Everything works as before

Hall-Ma avatar Oct 14 '22 11:10 Hall-Ma