How can I use electron renderer ipc in a react component js file ?
I wrote " const electron = require('electron') or import electron from 'electron' "
it doesn't work, error reports: "Module not' found, can't resolve 'electron' "
DO I have to config webpack or something ?
I'm stuck on this really for a few days. Thank you.
@PlacidoDomingo I found this Medium article that may be of some use. It looks like it may cover the topic you are asking about.
Hey there! We use the issue tracker for bug reports and feature requests.
If you have a question, please check our community support resources:
https://facebook.github.io/react/community/support.html
fantasitic, it works
the solution is:
in html file, window.require = require,
then in react js file, const electron = window.require('electron')
Most helpful comment
fantasitic, it works
the solution is:
in html file, window.require = require,
then in react js file, const electron = window.require('electron')