I've created an Electron app primarily a web-app, that has minor integration with the Electron app. The majority is just loading a website through a BrowserWindow with loadURL.
However for each CreateWindow spawned (they have the same content), I need variables to affect the single window, and not all of the windows.
Currently if I change a let
variable they are changed for all of the windows. I'm not sure how I would make the variables only be updated and usable with a certain value in the specific window.
e.g. if I set userId = 1 in one window, it's also changed in the 2nd window when I'm sending an ipc message through the web app. I'm not sure what would be the best logic here.