-
Notifications
You must be signed in to change notification settings - Fork 793
Object assign gives error when bundling react native package #78
Comments
changed from
to
And it started working again. Seems like an issue with Object.assign and react native, prooobably not related to this lib :)) |
@jbaxleyiii perhaps we should use |
@stubailo sounds good too me. I can change that out and open a PR this evening for it, unless you or someone else wants to get to it sooner? Also, welcome back! |
Hey good to be back! So relaxing :) I can try, but I have a lot of meetings so it might be much later today. |
haha same here 👍 |
Does assign even work with immutable Map? |
nvm.. The issue seems to be the use of immutable reducers.. Seems like react-apollo doesn't treat immutable data very well :) |
@AlmaasAre can you show me your usage? I'd love to improve this lib to support immutable data! Are you using immutable.js? |
@jbaxleyiii Yes sure, thanks! Yes i am! When using the connect function it fails. Tries to deep copy state by using Object.assign which i believe doesn't work well with immutablejs. I also got some errors of wrong usage of Object.assign:
I get this error by just using connect from apollo. Dunno what needs to be done tho. Check if the state is immutable before assigning? not sure |
@AlmaasAre yep! I need to add in a check for immutablejs 👍 |
Does it make more sense to provide a way for the user to map their Instead maybe |
Apollo Client now supports React Native as of 0.3.27! Going to close this issue because most of the conversation is about Immutable.js and not React Native. |
I think that with the 0.5.25 version of apollo-client that uses object spread and polyfills with Object.assign, this bug came back.. |
@davidyaha is this still the case for you with 0.7.1? If so, please open an issue on apollo-client! ❤️ |
Not sure.. I will update next week probably and if it reappears I'll open a new issue. |
Using react native and this line: https://github.com/apollostack/react-apollo/blob/master/src/connect.tsx#L158 gives me the following error in the react native simulator:
Anybody else receiving this?
The text was updated successfully, but these errors were encountered: