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: