I decided to add the RNDebugger and Redux Devtools Extension packages to my app for help debugging and for later testing with redux persist (which I haven't implemented yet). Thus, I am now using the the following packages for my React Native app's state architecture: React Redux, Redux, Redux Thunk, RNDebugger, and Redux Devtools Extension. The RNDebugger and Redux Devtools Extension was installed as a dev dependency, per their docs. I am using the composeWithDevTools function when creating my redux store. So I am wondering, do I have to install the RNDebugger and Redux Devtools Extension as production dependencies instead since the composeWithDevTools function is part of the Redux Devtools Extension package? I do not wish to use the debugger in Production, but I also don't want the app to fail when it goes to Production because the composeWithDevTools function is unknown. My code is working correctly and I can see the redux store in the RNDebugger (nice!). Nonetheless, this my basic setup:
// Store.js
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from "redux-devtools-extension";
import ReduxThunk from 'redux-thunk';
import reducers from '@reducers/';
export default createStore(
reducers,
composeWithDevTools(
applyMiddleware(ReduxThunk)
)
);
// App.js
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import Store from './Store';
import Router from './Router';
class App extends Component {
render() {
return (
<Provider store={Store}>
<Router />
</Provider>
);
}
}
export default App;