functional programming - Immutablejs within plain objects - Monads -


the redux best practices says not mix plain javascript object immutablejs objects. i'm trying hand @ functional programming , seems monads require computations/values stored inside object, or container of sorts. afaik immutablejs maps can't store methods. there issues using fp libraries folktale? haven't noticed noticeable issues basic todo app (which can try @ moment), i'm hoping clarification on immutablejs best practices, fp leaning.

never mix plain javascript objects immutable.js

ok, feel fool. read linked article again , saw it's not performance, avoid confusion when data passed immutable or pojo. here's relevant section article

in fact, might tempted put normal javascript object inside immutable map. don't this. mixing immutable , mutable state in same object reap confusion.

http://jlongster.com/using-immutable-data-structures-in-javascript


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -