DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
Redux Ecosystem Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
hard
Redux Ecosystem
Why does state.log.push(...) followed by { ...state } still count as a mutation bug, even though the top-level object is new?
A
It isn't a bug, this pattern is safe
B
push() mutates the array BEFORE the spread happens, and the shallow spread still copies over the SAME (now-mutated) array reference — so anything holding the 'before' reference sees the mutation too
C
The spread operator doesn't work with arrays
D
This only matters in strict mode
Check Answer