2 ms·
Two reasons: - Clarity of code. You can't accidentally mutate data that will then be used elsewhere. - Performance. Being able to avoid deep equality checks m
by tommoor 9y ago
Two reasons:
- Clarity of code. You can't accidentally mutate data that will then be used elsewhere.
- Performance. Being able to avoid deep equality checks makes a huge difference for React in particular.