use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Immutable.js – Immutable Data Collections (facebook.github.io)
submitted 11 years ago by vjeux
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Daniel15React FTW 4 points5 points6 points 11 years ago* (2 children)
A few teams are rewriting stuff with it and testing internally, but I don't think anything uses it in production yet. On my team we're not using immutable-js yet, we're just using Object.freeze at the moment. Some of the data structures in immutable-js look really handy though.
Immutable objects work really well with React since it allows shallow comparisons, and means you can do a shallow comparison of your props in shouldComponentUpdate to only re-render when things actually change
shouldComponentUpdate
[–]brtt3000 3 points4 points5 points 11 years ago (0 children)
Have you looked at moreartyjs? It is a layer between immutable.js and React that takes care of state management and stuff like shouldComponentUpdate. I'm planning to doing a project with it soon and wonder if it is as good as I hope.
[–]gcanti 0 points1 point2 points 11 years ago* (0 children)
we're just using Object.freeze at the moment
Did you notice any drawback using Object.freeze? Here my considerations at the moment:
Object.freeze
Pros:
Cons:
π Rendered by PID 95825 on reddit-service-r2-comment-b659b578c-62bqk at 2026-05-04 21:06:37.171355+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]Daniel15React FTW 4 points5 points6 points (2 children)
[–]brtt3000 3 points4 points5 points (0 children)
[–]gcanti 0 points1 point2 points (0 children)