there are multiple levels of tab and step, in state. It is very painful to modify a deeper level of state. How to split reducer?? Or how to flatten the reducer?
var tabs = [
{
id:1,
children:[
{
id:11,
steps:[
{
form:[
{
name:"foo",
type:"input"
}
]
},{},{}...
]
},
{
id:12,
steps:[{},{}]
}
]
},
{
id:2,
children:[]
},
...
]
for example, if I want to change the Foo value in state above, I need to find tabs [0] .children [0] .values [0] .form[ xx] .foo = "boo"
, which will be very painful. How can it be simplified?