4 ms·
The main thing I can think of is that it will add all it's internal methods to your objects, which restricts which properties you can use – eg, "update", "merge
by tommoor 9y ago
The main thing I can think of is that it will add all it's internal methods to your objects, which restricts which properties you can use – eg, "update", "merge" etc. This isn't usually an issue but we happened to have some policy objects with the same property names.
It also doesn't play nicely with Flow unless you use the static syntax.
- kasbah 9y agoAh, wasn't aware. Good to know. Well, I never did get Immutable.js to play nicely with Flow which is kind of why I gave up on Flow. I wondered if you might have something to say on performance issues. You didn't encounter anything of that sort?
- tommoor 9y agoPerformance was the main reason we switched over. We found using Immutable objects to be the key to a performant UI when using something like React that's diffing your props every render loop.
- kasbah 9y agoSo you would have your props be Immutable.js objects? I wasn't sure if doing that would be a good idea but sounds like that has worked out for you.