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,22 @@
|
||||
//! A simple example on how to use assets loading from the filesystem.
|
||||
//!
|
||||
//! Dioxus provides the asset!() macro which is a convenient way to load assets from the filesystem.
|
||||
//! This ensures the asset makes it into the bundle through dependencies and is accessible in environments
|
||||
//! like web and android where assets are lazily loaded using platform-specific APIs.
|
||||
|
||||
use dioxus::prelude::*;
|
||||
|
||||
static ASSET_PATH: Asset = asset!("/examples/assets/logo.png");
|
||||
|
||||
fn main() {
|
||||
dioxus::launch(app);
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
rsx! {
|
||||
div {
|
||||
h1 { "This should show an image:" }
|
||||
img { src: ASSET_PATH }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user