chore: cleanup workspace
This commit is contained in:
1 parent
3bedcb93ca
commit
8f0bb5dc5b
54 files changed
+691
-1822
No files matched your search
@@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "webview-client"
|
||||
version = "0.1.0"
|
||||
authors = ["Jonathan Kelley <jkelleyrtp@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
dioxus-core = {path = "../../core"}
|
||||
@@ -0,0 +1,64 @@
|
||||
use dioxus_core::patch::Edit;
|
||||
use dioxus_core::prelude::*;
|
||||
|
||||
static SERVER_RENDERED_KEY: &'static str = "abc123";
|
||||
#[derive(Debug, PartialEq, Props)]
|
||||
struct ServerRendered {
|
||||
name0: String,
|
||||
name1: String,
|
||||
name2: String,
|
||||
name3: String,
|
||||
name4: String,
|
||||
name5: String,
|
||||
name6: String,
|
||||
name7: String,
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
#[cfg(old)]
|
||||
fn blah() {
|
||||
// connect to the host server
|
||||
|
||||
let server_rendered = use_server_rendered((111111, 11111, 11), SERVER_RENDERED_KEY, || {
|
||||
ServerRendered {
|
||||
name0: "abc".to_string(),
|
||||
name1: "abc".to_string(),
|
||||
name2: "abc".to_string(),
|
||||
name3: "abc".to_string(),
|
||||
name4: "abc".to_string(),
|
||||
name5: "abc".to_string(),
|
||||
name6: "abc".to_string(),
|
||||
name7: "abc".to_string(),
|
||||
}
|
||||
});
|
||||
|
||||
let handler = dioxus_liveview::new_handler()
|
||||
.from_directory("abc123") // serve a given directory as the root
|
||||
.with_context(|| SomeContext {}) // build out a new context for all of the server-rendered components to share
|
||||
.with_route(SERVER_RENDERED_KEY, |cx: &ServerRendered| {
|
||||
//
|
||||
})
|
||||
.with_route(SERVER_RENDERED_KEY, |cx| {
|
||||
//
|
||||
})
|
||||
.with_route(SERVER_RENDERED_KEY, |cx| {
|
||||
//
|
||||
})
|
||||
.with_route(SERVER_RENDERED_KEY, |cx| {
|
||||
//
|
||||
})
|
||||
.with_route(SERVER_RENDERED_KEY, |cx| {
|
||||
//
|
||||
})
|
||||
.with_route(SERVER_RENDERED_KEY, |cx| {
|
||||
//
|
||||
})
|
||||
// depend on the framework, build a different type of handler
|
||||
// there are instructions on how to integrate this the various rusty web frameworks in the guide
|
||||
.build();
|
||||
|
||||
server.get("abc", handler);
|
||||
}
|
||||
|
||||
fn use_server_rendered<F: Properties>(_p: impl PartialEq, name: &'static str, f: impl Fn() -> F) {}
|
||||
Reference in new issue
Block a user