We have hot reload turned on for our application, at times the statement of opening Redux Devtool gets triggered. When it happens, the DevTool steals the focus. This can get annoying when developer is in the middle of writing and saving code, and the action of saving would trigger the build which subsequently opens the Redux DevTool.
I wonder if there is a way to know if the Redux DevTool is already open, so we can open the devtool when necessary.
Below is the source code we use to open Redux Devtool:
if (window.__REDUX_DEVTOOLS_EXTENSION__) {
enhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__());
window.__REDUX_DEVTOOLS_EXTENSION__.open('panel');
}