Skip to content

Instantly share code, notes, and snippets.

@guzmonne
Created March 19, 2017 00:36
Show Gist options
  • Select an option

  • Save guzmonne/2f1ceb3c1218c12fa2ac2ade0281770f to your computer and use it in GitHub Desktop.

Select an option

Save guzmonne/2f1ceb3c1218c12fa2ac2ade0281770f to your computer and use it in GitHub Desktop.
Add React Developent Tools to Electron project on development mode.
// If working in development mode, install React DevTools
if (process.env.NODE_ENV === 'development'){
const {
default: installExtension,
REACT_DEVELOPER_TOOLS
} = require('electron-devtools-installer')
// Install chrome extensions
installExtension(REACT_DEVELOPER_TOOLS)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment