3 ms·
As far as React goes, the performance increase with immutable/pure components more than offsets the penalty of using immutable structures and having to "copy"[0
by nathancahill 10y ago
As far as React goes, the performance increase with immutable/pure components more than offsets the penalty of using immutable structures and having to "copy"[0] data to change it. Of course, it depends on the app, if your data is change-heavy, this will be less true.
[0] Vanilla JS immutable types heavily optimize this. Immutable.js does as well, although there's obviously more overhead.
- grandalf 10y agoWhat vinalla js immutable types?
- nathancahill 10y agoStrings, integers, etc