React-apollo: Support immutable.js

Created on 29 Jun 2016  路  5Comments  路  Source: apollographql/react-apollo

Most helpful comment

I'd be happy to get a PR going for my suggestion, if it sounds good to the Apollo team 馃憤

All 5 comments

Quoting relevant comment from here: https://github.com/apollostack/react-apollo/issues/78#issuecomment-229407444

Does it make more sense to provide a way for the user to map their storeState to connect's local state? If you just add a check for immutable.js you'll still have the same problem when users are using other immutable libraries.

Instead maybe connect can accept a function like getStateFromStoreState that passes in storeState and lets the user parse and return a plain object representing their state.

I'd be happy to work on a PR for that ^ if you guys would be interested.

Any progress on this? Thanks!

I'd be happy to get a PR going for my suggestion, if it sounds good to the Apollo team 馃憤

@Aweary I'm assuming this would need to be supported in the client as well? If you can do a PR and/or provide a gist of using immutable.js with redux I can get it going

@Aweary the new API doesn't do any store copying so it should support immutable 馃憤

Was this page helpful?
0 / 5 - 0 ratings