Fix cargo check on examples
This commit is contained in:
42 files changed
+95
-145
No files matched your search
@@ -7,18 +7,15 @@ publish = false
|
||||
[lib]
|
||||
|
||||
[dependencies]
|
||||
dioxus-desktop = { workspace = true, optional = true }
|
||||
dioxus = { workspace = true }
|
||||
dioxus-router = { workspace = true }
|
||||
dioxus-fullstack = { workspace = true }
|
||||
axum = { version = "0.6.12", optional = true }
|
||||
tokio = { workspace = true, features = ["full"], optional = true }
|
||||
serde = "1.0.159"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
ssr = ["axum", "tokio", "dioxus-fullstack/axum"]
|
||||
desktop = ["dioxus-desktop"]
|
||||
ssr = ["axum", "tokio", "dioxus/axum"]
|
||||
desktop = ["dioxus/desktop"]
|
||||
|
||||
[[bin]]
|
||||
name = "client"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#![allow(non_snake_case)]
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_fullstack::prelude::*;
|
||||
|
||||
pub fn app() -> Element {
|
||||
let mut count = use_signal(|| 0);
|
||||
|
||||
@@ -7,15 +7,12 @@ publish = false
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
dioxus-web = { workspace = true, features = ["hydrate"], optional = true }
|
||||
dioxus = { workspace = true }
|
||||
dioxus-router = { workspace = true, features = ["fullstack"]}
|
||||
dioxus-fullstack = { workspace = true }
|
||||
dioxus = { workspace = true, features = ["router"] }
|
||||
axum = { version = "0.6.12", optional = true }
|
||||
tokio = {workspace = true, features = ["full"], optional = true }
|
||||
serde = { version = "1.0.159", features = ["derive"] }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
ssr = ["axum", "dioxus-fullstack/axum"]
|
||||
web = ["dioxus-fullstack/web", "dioxus-router/web"]
|
||||
ssr = ["axum", "dioxus/axum"]
|
||||
web = ["dioxus/web"]
|
||||
@@ -5,8 +5,7 @@
|
||||
//! ```
|
||||
|
||||
use dioxus::prelude::*;
|
||||
use dioxus::router::prelude::*;
|
||||
use dioxus_fullstack::prelude::*;
|
||||
use dioxus_router::prelude::*;
|
||||
|
||||
fn main() {
|
||||
let config = LaunchBuilder::fullstack();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use dioxus_lib::prelude::*;
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
use std::any::Any;
|
||||
// use std::any::Any;
|
||||
use std::cell::Cell;
|
||||
use std::cell::Ref;
|
||||
use std::cell::RefCell;
|
||||
@@ -23,13 +23,12 @@ use std::sync::Arc;
|
||||
///
|
||||
/// - dependencies: a tuple of references to values that are PartialEq + Clone
|
||||
#[must_use = "Consider using `cx.spawn` to run a future without reading its value"]
|
||||
pub fn use_server_future<T, F>(future: impl FnOnce() -> F) -> Option<UseServerFuture<T>>
|
||||
pub fn use_server_future<T, F>(_future: impl FnOnce() -> F) -> Option<UseServerFuture<T>>
|
||||
where
|
||||
T: 'static + Serialize + DeserializeOwned + Debug,
|
||||
F: Future<Output = T> + 'static,
|
||||
{
|
||||
todo!()
|
||||
|
||||
// let state = use_hook(move || UseServerFuture {
|
||||
// update: schedule_update(),
|
||||
// needs_regen: Cell::new(true),
|
||||
@@ -110,7 +109,6 @@ pub struct UseServerFuture<T> {
|
||||
update: Arc<dyn Fn()>,
|
||||
needs_regen: Cell<bool>,
|
||||
task: Cell<Option<Task>>,
|
||||
dependencies: Vec<Box<dyn Any>>,
|
||||
value: Rc<RefCell<Option<Box<T>>>>,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user