React & Modern Frontend (445 Qs)•Part 5: React Redux State Management (101 - 134)
What are the drawbacks of MVW pattern?
- DOM manipulation is very expensive which causes applications to behave slow and inefficient.
- Due to circular dependencies, a complicated model was created around models and views.
- Lot of data changes happens for collaborative applications(like Google Docs).
- No way to do undo (travel back in time) easily without adding so much extra code.
Practical Code Example
javascript
// Drawbacks of traditional Model-View-Whatever (MVW / two-way data binding):
// 1. Cascading updates where Model A mutates Model B, causing infinite loops
// 2. Difficult to trace origin of state mutations