I have a module object, that consists of several parameters and an algorithm.
A parameter consists of a min
, max
, step
, label
and value
.
The module's algorithm is regularly making a calculation based on a value on each the parameters.
In my application each of the parameters is represented by a slider on the GUI.
If you're interested, the production version of this application is here. The code base is a mess and I'm currently tidying up.
My question is how I represent this in a react/redux architecture.
The module and its algorithm are static. But a user should be able to save the state of the application, which will likely be saved on a JSON database. At the minimum all this needs to be is simple JSON object that contains the value of each of the parameters.
So what I want to be able to do is, for each of modules, list a series of parameters that define the algorithm, and the react just for each renders each of the parameters. Simple enough.
How do I handle the differentiation between the functional model, the state we're trying to save, which is just a few values? Should I be using my doing the algorithmic calculations as a part of the dispatch actions? Does this list of parameters come through from the redux state?