Open YavorLalev opened 7 months ago
As a developer I need to reduce the number of useStates to have an overall well structured state management.
[x] Create a feature branch state-management.
state-management
[x] In general:
const initialvalues ={state1:"", state2:"", state3:""}
const [data, setData] = useState(initialvalues)
handleChange
function handleChangeData(event) {setData({ ...data, [event.target.name]: event.target.value })}
[x] Put all the states for the following components:
XandYLabelsGraph
GraphTitle
BarProperties
LineProperties
MarkerProperties
GridProperties
RangeProperties
LogScaleProperties
into one state variable called settings.
settings
[x] Adjust all components + the Plotting component.
Plotting
Great improvement. Functionality is good. LGTM 👍
Value proposition
As a developer I need to reduce the number of useStates to have an overall well structured state management.
Acceptance Criteria
Tasks
[x] Create a feature branch
state-management
.[x] In general:
const initialvalues ={state1:"", state2:"", state3:""}
const [data, setData] = useState(initialvalues)
handleChange
:function handleChangeData(event) {setData({ ...data, [event.target.name]: event.target.value })}
[x] Put all the states for the following components:
XandYLabelsGraph
GraphTitle
BarProperties
LineProperties
MarkerProperties
GridProperties
RangeProperties
LogScaleProperties
into one state variable called
settings
.[x] Adjust all components + the
Plotting
component.