Hacker News new | past | comments | ask | show | jobs | submit login

React's documentation also discuss their immutability helpers [1]. This new library looks like a better way of implementing this though. Will the documentation be amended to discuss use of immutable-js?

[1] http://facebook.github.io/react/docs/update.html




React immutability helpers pros:

- Work on regular JavaScript Object and Array so it's easy to get started and integrate to your app

- You don't need to wrap objects inside of Immutable to use it and you can use `obj.key` and `arr[0]` syntax for accessing them instead of `obj.get('key')` and `arr.get(0)`

cons:

- There are no safe-guards if you mutate the objects and it'll likely break your app in subtle ways. This kind of discipline is very hard to get in big projects

- You are stuck with primitive data structures (instead of map hash trie), so it's not going to be as performant and memory efficient.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: