-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue: Unexpected behaviors when editing dynamic parts with hot-reload
#766
Comments
For the second case (to freeze hot-reload), I'm receiving this terminal message: Rebuild needed... shutting down hot reloading.
Manually rebuild the application to view further changes. how can I automate rebuild when requested by freya? |
Hey, Support for Dioxus hotreload is limited, can only edit static parts, this means that changing And no, Freya cannot request another build because it's being run through by That said, I might actually just remove hot reload in the next release. I don't think most people use it (I don't at least) because of how not-worth using it is. Maybe once Dioxus gets decent support for binary patching, I could support it in Freya |
hot-reload
hot-reload existed to increase productivity when coding apps, and despite the limits mentioned above, it helps saving developer's time when styling and positioning content.
Currently, the logs are available to recommend a manual restart, and by invoking
// run.js
const { spawn } = require('child_process');
spawn_cargo()
function spawn_cargo() {
const child = spawn('cargo', ['run']);
child.stdout.on('data', (data) => {
console.log(`${data}`)
if (data.indexOf("Manually rebuild the application to view further changes.") > -1) {
child.kill('SIGINT')
spawn_cargo()
}
});
child.stderr.on('data', (data) => {
console.error(`${data}`)
});
child.on('error', (error) => {
console.error(`error: ${error.message}`);
});
child.on('close', (code) => {
console.log(`child process exited with code ${code}`);
});
} |
Yeah sure but that would require a small CLI as you can see, if you want to make a rust POC maybe I could consider it. |
Let's consider the sample code below (counter)
to crash the app:
cargo run
"{count}"
with""
, then save to see the change reflecting on screento freeze hot-reload:
cargo run
count
signal"{count}"
to"count: {count}"
count
signaldevelopment environment:
The text was updated successfully, but these errors were encountered: