Answer the question
In order to leave comments, you need to log in
How to easily update nested state fields in a react-redux app?
I use useReducer and Context from react in a small application.
The state is quite deep and updating it in the usual way is pretty mind-blowing.
An example of my state:
const state= [
{
name: '',
lastName: '',
nestedObj: [
{
field: ''
anotherField: {
a,
b,
c,
d
}
}
]
}
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question