DEV Community

Discussion on: Setting Electron + React with Typescript

Collapse
 
franamorim profile image
Francisco Amorim

Yup, you are right! Will edit the post.

For any strange behaivor you can check the repo.

Thx!

Collapse
 
madalucard profile image
Martin Lapihuska • Edited

Great article that helped me set up my enviroment. But i see that you did not changed in article @shadowtsw 's notes.

I am not sure if it's by changes over time, but this part of code did not worked for me.

console.log(isDev);
  win.loadURL(
    isDev
      ? 'http://localhost:9000'
      : `file://${app.getAppPath()}/index.html`,
  );
Enter fullscreen mode Exit fullscreen mode

Instead of win.loadURL('index.html'); i used win.loadFile('index.html'); and it started working showing content in windows.

Thx.