How to set multiple fields at once in Immutable.js Record?

Personally I prefer the merge syntax, it feels more natural:

const newContent = oldContext.merge({
    "logged": true, 
    "error": false
});

If you were doing something very complex, maybe the transient version would be better, but I just can’t imagine where.

It also means you can leverage mergeDeep if needed.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)