title: React Native Hot Reloading: "<Provider> does not support changing `store` on the fly"
body: <p>(React Native version 0.27.2)</p>
  
  <p>I have turned on "Hot Reloading" in the simulator. When I make a change, such as adding a debug <code>&lt;Text&gt;</code> element, the grey "Hot loading" bar appears at the top, and the following is logged to the Xcode console:</p>
  
  <pre><code> 2016-06-16 09:47:52.276 [info][tid:com.facebook.react.JavaScript] [React Transform HMR] Patching _component
   2016-06-16 09:47:52.283 [info][tid:com.facebook.react.JavaScript] [React Transform HMR] Patching _component
  </code></pre>
  
  <p>Also, the following is logged by the packager:</p>
  
  <pre><code>[Hot Module Replacement] File change detected (9:47:49:334)
  [Hot Module Replacement] File change detected (9:47:49:336)
  [9:47:52 AM] &lt;START&gt; find dependencies
  [9:47:52 AM] &lt;START&gt; find dependencies
  [9:47:52 AM] &lt;END&gt;   find dependencies (0ms)
  [9:47:52 AM] &lt;END&gt;   find dependencies (1ms)
  [Hot Module Replacement] Sending HMR update to client (9:47:52:255)
  [Hot Module Replacement] Sending HMR update to client (9:47:52:256)
  [9:47:52 AM] &lt;START&gt; request:/ReactComponent/components/App.map?platform=ios&amp;runModule=false&amp;entryModuleOnly=true&amp;hot=true
  [9:47:52 AM] &lt;START&gt; find dependencies
  [9:47:53 AM] &lt;END&gt;   find dependencies (837ms)
  [9:47:53 AM] &lt;END&gt;   request:/ReactComponent/components/App.map?platform=ios&amp;runModule=false&amp;entryModuleOnly=true&amp;hot=true (843ms)
  [9:47:53 AM] &lt;START&gt; request:/ReactComponent/components/App.map?platform=ios&amp;runModule=false&amp;entryModuleOnly=true&amp;hot=true
  [9:47:53 AM] &lt;END&gt;   request:/ReactComponent/components/App.map?platform=ios&amp;runModule=false&amp;entryModuleOnly=true&amp;hot=true (2ms)
  </code></pre>
  
  <p>However, nothing changes. The text element does not appear, even when adding it to my topmost element. Only a full reload (<code>Cmd+R</code> in the simulator) causes it to appear.</p>
  
  <p>What are some things I can check that I may be doing wrong?</p>
  
  <p>Here is my <code>package.json</code>:</p>
  
  <pre><code>{
    "name": "myappname",
    "version": "1.0.0",
    "private": true,
    "scripts": {
      "start": "(JS_DIR=`pwd`/ReactComponent; cd node_modules/react-native; npm run start -- --root $JS_DIR)"
    },
    "dependencies": {
      "react": "^15.1.0",
      "react-addons-update": "^15.1.0",
      "react-native": "^0.27.2",
      "react-native-navbar": "^1.5.0",
      "react-native-search-bar": "^2.11.0",
      "react-redux": "^4.4.5",
      "redux": "^3.5.2",
      "redux-logger": "^2.6.1",
      "redux-persist": "^3.2.2",
      "redux-thunk": "^1.0.3"
    }
  }
  </code></pre>
  
  <hr>
  
  <p><strong>Update 1</strong></p>
  
  <p>I am pretty sure it has something to do with Redux. <a href="https://facebook.github.io/react-native/releases/next/#redux-stores" rel="nofollow">https://facebook.github.io/react-native/releases/next/#redux-stores</a></p>
  
  <p>However, I have updated my store creation code as described there. Here is my <code>configureStore.js</code>:</p>
  
  <pre><code>import { createStore, applyMiddleware, compose } from 'redux'
  import thunk from 'redux-thunk'
  import devTools from 'remote-redux-devtools'
  import mainReducer from './reducers'
  import {persistStore, autoRehydrate} from 'redux-persist'
  
  export default function configureStore() {
      const enhancer = compose(applyMiddleware(thunk), devTools(), autoRehydrate())
      const store = createStore(mainReducer, undefined, enhancer)
      if (module.hot) {
          console.log("hot reload detected")
          if (module.hot.accept) {
            console.log("have accept")            
          }
          module.hot.accept(() =&gt; {
              console.log("replacing reducer...")            
              const nextRootReducer = require('./reducers/index').default
              store.replaceReducer(nextRootReducer)
          })
      } else {
          console.log("no hot reload???!")
      }
      persistStore(store)
      return store
  }
  </code></pre>
  
  <p>I had my hopes up, but now whenever I change anything, I get the message</p>
  
  <pre><code>&lt;Provider&gt; does not support changing `store` on the fly. It is most
  likely that you see this error because you updated to Redux 2.x and
  React Redux 2.x which no longer hot reload reducers automatically.
  See https://github.com/reactjs/react-redux/releases/tag/v2.0.0 
  for the migration instructions.
  </code></pre>
  
  <p>The log outputs "hot reload detected" and "have accept", but NOT "replacing reducer..."</p>