fyi: If somebody wants to use Electric locally in a VSCode DevContainer. These are the ports that you need to forward (settings in dev-container.json):
"forwardPorts": [8080, 8081, 9630, n-repl-port-here],
"portsAttributes": {
"n-repl-port-here": { "label": "nrepl" },
"8080": { "label": "Electric HTTP" },
"8081": { "label": "Electric compiler auth server" },
"9630": { "label": "shadow server" }
}Hello 👋 should I see any other message after 'Connecting...' in the browser console? I'm trying the electric-starter-app
you should see the two-clocks example, please provide a lot more information about your system
👍 that's showing up. When I save the file I get a Reactor failure
Looks like everything is working depite the error 🤔
After hot code reload you see the error? Are you using firefox per chance?
Yes, after saving the file. This is the output after first load and saving a file, I tried Chrome and Firefox
With timestamps, so it's clear when reload happens
If I understand correctly what is happening, the missionary.Cancelled is in response to dev/stop!, and unrelated to the newly started instance. I don't know exactly why the messages are logged out of order but we have a backlog ticket to improve this (by not presenting a scary red failure message for this mundane operation of stopping the system)
So it's no biggie, I see. Thanks!
Should the basic examples be able to preserve state between reloads? Or should I use some extra code/technique to do so? I'm writing a basic login form and every time I save the file I loose the input's value
on hot code reload the entire app is discarded and rebuilt. This is about your dev workflow though. If the business story is the user should not lose form state on page reload, closing/opening the tab, then you'll need to store (read & write) that state somewhere. This can be the URL, localstorage, your backend..
I understand that modern React workflows have dev time instrumentation to achieve a state-preserving hot code reload - we have not done anything like that yet and have no plans to do it soon