Answer the question
In order to leave comments, you need to log in
How to correctly remove elements from a large redux state?
//state, приблизительно
state = {
level0: [{
id:0,
m0: 0,
level1: [{
id:10,
m1: 1,
level2: [{
id:20,
m2: 2,
level3: [{
// ...
}]
}]
}]
}]
}
Answer the question
In order to leave comments, you need to log in
You need to make a deepclone, remove the desired element from it and return the deepclone
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question