-
Notifications
You must be signed in to change notification settings - Fork 42
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
Hot reloading support #67
Conversation
euclid = { version = "0.22", features = ["serde"] } | ||
# mozbuild = "0.1.0" | ||
|
||
[dev-dependencies] | ||
blitz = { path = "./packages/blitz" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this change be causing the examples not to work correctly?
packages/dioxus-blitz/Cargo.toml
Outdated
dioxus-cli-config = { git = "https://github.com/dioxuslabs/dioxus", rev = "a3aa6ae771a2d0a4d8cb6055c41efc0193b817ef"} | ||
dioxus-hot-reload = { git = "https://github.com/dioxuslabs/dioxus", rev = "a3aa6ae771a2d0a4d8cb6055c41efc0193b817ef"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be optional, based on the hot-reload
feature.
packages/dom/src/document.rs
Outdated
let parent_id = node.parent.unwrap(); | ||
|
||
// Get this node's parent, or the root node if it has none. | ||
let parent_id = node.parent.unwrap_or_default(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem right. Only the root node should have no parent. And we wouldn't want to insert a child of the root node instead of a sibling. What is the use case here? Replacing the root node?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be necessary. The root node should be ElementId(0)
and every node except that node should have a parent in dioxus mutations. Dioxus will never insert a node after or before ElementId(0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hot reloading part of this looks good! It is very similar to how desktop does things which is nice
Connects
blitz
to thedioxus-hot-reload
crate by propagatingtao
events to theDioxusDocument
.Blitz examples still don't seem to work correctly, I think it has something to do with the virtual manifest?