title: Building error after I create my Redux store (React Native + Redux)
body: <p>I start working on the app from my site (ReactJS + Redux + Express), and I want to use the same backend and database for the app and the site. Now decide to reuse most of my ReactJS code, since I understand I can use the same function. I created the Redux store in my main folder, but at building time it doesn't work and it gave me the following errors:</p>
  <pre><code> ERROR  TypeError: undefined is not a function, js engine: hermes
   ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
        This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
   ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
        This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
  </code></pre>
  <p>I tried every single store layout, but it seem not to work. I can't even connect the RNDebugger to the app.
  Here's my store:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import {createStore, applyMiddleware, compose} from 'redux';
  import {thunk} from 'redux-thunk';
  import rootReducer from './src/reducers';
  
  const initialState = {};
  
  const middleware = [thunk];
  
  const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
  
  const store = createStore(
    rootReducer,
    initialState,
    composeEnhancers(
      applyMiddleware(...middleware),
    ),
  );
  
  export default store;</code></pre>
  </div>
  </div>
  </p>
  <p>And my App.js :</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React from 'react';
  import {NavigationContainer} from '@react-navigation/native';
  
  import DrawerNavigator from './src/routes/DreawerNavigator';
  
  import {Provider} from 'react-redux';
  import store from './store';
  
  export default function App() {
    return (
      &lt;Provider store={store}&gt;
        &lt;NavigationContainer&gt;
          &lt;DrawerNavigator /&gt;
        &lt;/NavigationContainer&gt;
      &lt;/Provider&gt;
    );
  }</code></pre>
  </div>
  </div>
  </p>
  <p>Anyone could please explain to me why it doesn't works and how I can connect the RNDebugger to my app?</p>
  <p>EDIT: I figured out the error is located in the store.js file, when I comment the <code>const store = ...</code> the app back to work. Really don't understand why</p>