immutable-js v4.0.0-rc.8 Release Notes
Release Date: 2017-10-17 // over 6 years ago-
BREAKING:
๐
list.concat()
now has a slightly more efficient implementation andmap.concat()
is an alias formap.merge()
. (#1373)๐ In rare cases, this may affect use of
map.concat()
which expected slightly different behavior frommap.merge()
.isImmutable()
now returns true for collections currently within awithMutations()
call. (#1374)Previously,
isImmutable()
did double-duty of both determining if a value was a Collection or Record from this library as well as if it was outside awithMutations()
call. This latter case caused confusion and was rarely used.Plain Objects and Arrays are no longer considered opaque values (#1369)
โก๏ธ This changes the behavior of a few common methods with respect to plain Objects and Arrays where these were previously considered opaque to
merge()
andsetIn()
, they now are treated as collections and can be merged into and updated (persistently). This offers an exciting alternative to small Lists and Records.๐ No longer use value-equality within
merge()
(#1391)๐ This rectifies an inconsistent behavior between x.merge(y) and x.mergeDeep(y) where merge would use === on leaf values to determine return-self optimizations, while mergeDeep would use
is()
. This improves consistency across the library and avoids a possible performance pitfall.๐ New:
- โก๏ธ Dramatically better Flow types for
getIn()
,setIn()
,updateIn()
which understand key paths (#1366, #1377) - ๐ Functional API for
get()
,set()
, and more which support both Immutable.js collections and plain Objects and Arrays (#1369)
๐ Fixed:
- โก๏ธ Dramatically better Flow types for