codify "platform" into resolution logic, server-fn/fullstack overhaul (#4596)
overhaul dioxus fullstack using a new implementation of server_fn This PR is a complete rewrite of dioxus fullstack designed to improve compatibility with axum and to fix a number of compilation errors based on feature flag unification plumbing through macros.
This commit is contained in:
1 parent
8421c3aef0
commit
f2b1c6d97f
424 files changed
+17284
-6624
No files matched your search
@@ -0,0 +1,27 @@
|
||||
//! Run a callback
|
||||
//!
|
||||
//! Whenever an Element is finally mounted to the Dom, its data is available to be read.
|
||||
//! These fields can typically only be read asynchronously, since various renderers need to release the main thread to
|
||||
//! perform layout and painting.
|
||||
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_elements::geometry::euclid::Size2D;
|
||||
|
||||
fn main() {
|
||||
dioxus::launch(app);
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
let mut dimensions = use_signal(Size2D::zero);
|
||||
|
||||
rsx!(
|
||||
Stylesheet { href: asset!("/examples/assets/read_size.css") }
|
||||
div {
|
||||
width: "50%",
|
||||
height: "50%",
|
||||
background_color: "red",
|
||||
onresize: move |evt| dimensions.set(evt.data().get_content_box_size().unwrap()),
|
||||
"This element is {dimensions():?}"
|
||||
}
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user