hyperfiddle

Hendrik 2025-12-01T09:21:19.591919Z

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" }
  }

frankitox 2025-12-01T15:10:18.440719Z

Hello 👋 should I see any other message after 'Connecting...' in the browser console? I'm trying the electric-starter-app

Dustin Getz (Hyperfiddle) 2025-12-01T15:11:41.192419Z

you should see the two-clocks example, please provide a lot more information about your system

frankitox 2025-12-01T15:13:11.384809Z

👍 that's showing up. When I save the file I get a Reactor failure

frankitox 2025-12-01T15:19:37.914579Z

Looks like everything is working depite the error 🤔

Dustin Getz (Hyperfiddle) 2025-12-01T15:26:12.224109Z

After hot code reload you see the error? Are you using firefox per chance?

frankitox 2025-12-01T15:29:59.313309Z

Yes, after saving the file. This is the output after first load and saving a file, I tried Chrome and Firefox

frankitox 2025-12-01T15:35:06.567829Z

With timestamps, so it's clear when reload happens

Dustin Getz (Hyperfiddle) 2025-12-01T15:35:32.353079Z

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)

frankitox 2025-12-01T15:37:26.376939Z

So it's no biggie, I see. Thanks!

frankitox 2025-12-01T16:13:27.413789Z

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

xificurC 2025-12-01T16:21:46.830949Z

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..

Dustin Getz (Hyperfiddle) 2025-12-01T16:23:38.368819Z

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

👍 1