dioxus
dioxus copied to clipboard
Hotreload poll causes server_futures to repeatedly get called
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
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