{"action":"created","issue":{"url":"https://api.github.com/repos/apollostack/react-apollo/issues/112","repository_url":"https://api.github.com/repos/apollostack/react-apollo","labels_url":"https://api.github.com/repos/apollostack/react-apollo/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/apollostack/react-apollo/issues/112/comments","events_url":"https://api.github.com/repos/apollostack/react-apollo/issues/112/events","html_url":"https://github.com/apollostack/react-apollo/issues/112","id":165939676,"number":112,"title":"Interegrate with react-loop reducer cause error","user":{"login":"wuzhuzhu","id":8170316,"avatar_url":"https://avatars.githubusercontent.com/u/8170316?v=3","gravatar_id":"","url":"https://api.github.com/users/wuzhuzhu","html_url":"https://github.com/wuzhuzhu","followers_url":"https://api.github.com/users/wuzhuzhu/followers","following_url":"https://api.github.com/users/wuzhuzhu/following{/other_user}","gists_url":"https://api.github.com/users/wuzhuzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/wuzhuzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wuzhuzhu/subscriptions","organizations_url":"https://api.github.com/users/wuzhuzhu/orgs","repos_url":"https://api.github.com/users/wuzhuzhu/repos","events_url":"https://api.github.com/users/wuzhuzhu/events{/privacy}","received_events_url":"https://api.github.com/users/wuzhuzhu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/apollostack/react-apollo/labels/apollo-client","name":"apollo-client","color":"c5def5"},{"url":"https://api.github.com/repos/apollostack/react-apollo/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-16T17:42:48Z","updated_at":"2016-08-13T22:59:06Z","closed_at":"2016-08-13T22:59:06Z","body":"I'm trying to use apollo on pepperoni(React Native) which use 'react-loop' reducer combiner.\r\nhttps://github.com/futurice/pepperoni-app-kit\r\nhttps://github.com/raisemarketplace/redux-loop\r\nand got error \"Existing store does not use apolloReducer for apollo\".\r\n\r\nreducer.js:\r\n```\r\nimport {Map} from 'immutable';\r\nimport {combineReducers} from 'redux-loop';\r\nimport NavigationStateReducer from '../modules/navigation/NavigationState';\r\nimport AuthStateReducer from '../modules/auth/AuthState';\r\nimport CounterStateReducer from '../modules/counter/CounterState';\r\nimport SessionStateReducer, {RESET_STATE} from '../modules/session/SessionState';\r\nimport {apolloReducer} from './apollo'\r\n\r\nconst reducers = {\r\n  // Apollo Reducer\r\n  apollo: apolloReducer,\r\n\r\n  // Authentication/login state\r\n  auth: AuthStateReducer,\r\n\r\n  // Counter sample app state. This can be removed in a live application\r\n  counter: CounterStateReducer,\r\n\r\n  // @NOTE: By convention, the navigation state must live in a subtree called\r\n  //`navigationState`\r\n  navigationState: NavigationStateReducer,\r\n\r\n  session: SessionStateReducer\r\n\r\n};\r\n\r\n// initial state, accessor and mutator for supporting root-level\r\n// immutable data with redux-loop reducer combinator\r\nconst immutableStateContainer = Map();\r\nconst getImmutable = (child, key) => child ? child.get(key) : void 0;\r\nconst setImmutable = (child, key, value) => child.set(key, value);\r\n\r\nconst namespacedReducer = combineReducers(\r\n  reducers,\r\n  immutableStateContainer,\r\n  getImmutable,\r\n  setImmutable\r\n);\r\n\r\nexport default function mainReducer(state, action) {\r\n  if (action.type === RESET_STATE) {\r\n    return namespacedReducer(action.payload, action);\r\n  }\r\n\r\n  return namespacedReducer(state || void 0, action);\r\n}\r\n\r\n```\r\nMaybe combinReducer from redux-loop break the apolloReducer?\r\nIs there any possible to make apollo work with react-loop together? \r\n"},"comment":{"url":"https://api.github.com/repos/apollostack/react-apollo/issues/comments/239646033","html_url":"https://github.com/apollostack/react-apollo/issues/112#issuecomment-239646033","issue_url":"https://api.github.com/repos/apollostack/react-apollo/issues/112","id":239646033,"user":{"login":"jbaxleyiii","id":4967600,"avatar_url":"https://avatars.githubusercontent.com/u/4967600?v=3","gravatar_id":"","url":"https://api.github.com/users/jbaxleyiii","html_url":"https://github.com/jbaxleyiii","followers_url":"https://api.github.com/users/jbaxleyiii/followers","following_url":"https://api.github.com/users/jbaxleyiii/following{/other_user}","gists_url":"https://api.github.com/users/jbaxleyiii/gists{/gist_id}","starred_url":"https://api.github.com/users/jbaxleyiii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbaxleyiii/subscriptions","organizations_url":"https://api.github.com/users/jbaxleyiii/orgs","repos_url":"https://api.github.com/users/jbaxleyiii/repos","events_url":"https://api.github.com/users/jbaxleyiii/events{/privacy}","received_events_url":"https://api.github.com/users/jbaxleyiii/received_events","type":"User","site_admin":false},"created_at":"2016-08-13T22:59:06Z","updated_at":"2016-08-13T22:59:06Z","body":"@wuzhuzhu here is an example of it working with redux-loop: https://github.com/apollostack/react-apollo/pull/137\r\n\r\nThe issue with the above actually has to do with immutablejs support for the core client. I've added that in the same PR\r\n\r\nThis will work in `0.4.3`"}}
{"actor":{"display_login":"jbaxleyiii"}}