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
What does Array.prototype.push() return, and why is `items: state.items.push(x)` a bug in a reducer?
A
It returns the new array; the bug is only that it mutates
B
It returns the array's new LENGTH (a number), so the reducer would assign a number where an array is expected, in addition to mutating the original array
C
It returns undefined, causing a crash
D
It's not a bug, push() is safe to use in reducers
Check Answer