question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Immutable.JS support

See original GitHub issue

Hi, thanks for an awesome library!

One thing that I’ve stumbled across when trying to use it in my app is a redux state wrapped in immutable structure. I’m using https://facebook.github.io/immutable-js across all my apps, so store.getState will return immutable map instead of a plain js object.

Is there any possibility to make it work?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:20 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
Kay2dancommented, Jul 14, 2017

Just want to add a shoutout here. I too am a big immutable fan and have just across this library. Will be going through the blog posts & docs & hopefully implement in the new project Ive started. First-class immutable support would be ideal though 😃

1reaction
iansinnottcommented, Jul 11, 2017

Yeah, performance is definitely a concern if you’re wrapping a reducer with fromJS and toJS. But so far I haven’t had any issues keeping a the plain object state in my overall immutable state. It’s just inconsistent and thus not simple.

If that perf ever did become an issue though there are options available.

  • Implement something like redux-first-router/immutable like redux-form does or create a separate project that does the same
  • Implement the reducer yourself like react-router-redux suggests
  • Fork this project and just code it yourself
  • More solutions I haven’t thought of…
Read more comments on GitHub >

github_iconTop Results From Across the Web

Immutable.js
js gives you the ability to create a temporary mutable (transient) copy of a collection and apply a batch of mutations in a...
Read more >
The React.js Way: Flux Architecture with Immutable.js
How to write blazing fast component based React.js apps with Flux architecture, Immutable.js, and ES6.
Read more >
Immutable.js is not dead! : r/javascript - Reddit
I'm going to announce time of death for projects to be when someone feels compelled to make a "[project] is not dead" blog...
Read more >
Writing Immutable JavaScript in 2022 - /dev/solita
Clojure has built-in support for functional programming and ... We can make JavaScript objects immutable by calling Object.freeze(object) :.
Read more >
Immutable.js documentation - DevDocs
Immutable.js 4.1.0 API documentation with instant search, offline support, keyboard shortcuts, mobile version, and more.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found