How to fix electron issues
Issue #415
Electron require() is not defined
https://stackoverflow.com/questions/44391448/electron-require-is-not-defined
1 | function createWindow () { |
DevTools was disconnected from the page
1 | npm install babel-cli@latest --save-dev |
1 | win.openDevTools() |
This leads to Cannot find module 'react/lib/ReactComponentTreeHook'
If we’re using binary, then rebuild, it is the problem that cause devTools not work
1 | npx electron-builder |
This goes to Cannot read property injection of undefined at react-tap-event-plugin
https://github.com/zilverline/react-tap-event-plugin/issues/121
1 | npm uninstall react-tap-event-plugin |
This goes to Unknown event handler property onTouchTap
in EnhancedButton in material-ui
Update material-ui
https://material-ui.com/
https://material-ui.com/guides/migration-v0x/#raised-button
1 | npm install @material-ui/core |
From
1 | import RadioButtonGroup from '@material-ui/core/RadioButton/RadioButtonGroup' |
to
1 | import RadioButtonGroup from '@material-ui/core/RadioGroup' |
Use FormControlLabel https://material-ui.com/components/radio-buttons/
1 | <RadioGroup |