dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Hotreload poll causes server_futures to repeatedly get called

Open jkelleyrtp opened this issue 1 year ago • 1 comments

Problem

We shouldn't reload the page entirely every 1 second - just check for heartbeat and then sync state. If the state is different then maybe re-running the server_futures is a good idea, but right now, reloading every future is unnecessary.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment:

  • Dioxus version: [e.g. v0.17, master]
  • Rust version: [e.g. 1.43.0, nightly]
  • OS info: [e.g. MacOS]
  • App platform: [e.g. web, desktop]

Questionnaire

  • [ ] I'm interested in fixing this myself but don't know where to start
  • [ ] I would like to fix and I have a solution
  • [ ] I don't have time to fix this right now, but maybe later

jkelleyrtp avatar Mar 09 '24 00:03 jkelleyrtp

I don't think we should cache server functions automatically. When the hot reload web socket tries to connect to the server every second we shouldn't be trying to render HTML because it is a web socket connection

ealmloff avatar Mar 11 '24 19:03 ealmloff