Fix the router and stub out a number of crates to get compiling
This commit is contained in:
226 files changed
+1057
-1482
No files matched your search
@@ -29,8 +29,8 @@
|
||||
//! }
|
||||
//! }
|
||||
//!
|
||||
//! fn app(cx: Scope) -> Element {
|
||||
//! let text = use_state(cx, || "...".to_string());
|
||||
//! fn app() -> Element {
|
||||
//! let text = use_state(|| "...".to_string());
|
||||
//!
|
||||
//! cx.render(rsx! {
|
||||
//! button {
|
||||
@@ -182,7 +182,7 @@ pub trait DioxusRouterExt<S> {
|
||||
/// .unwrap();
|
||||
/// }
|
||||
///
|
||||
/// fn app(cx: Scope) -> Element {
|
||||
/// fn app() -> Element {
|
||||
/// todo!()
|
||||
/// }
|
||||
/// ```
|
||||
@@ -211,7 +211,7 @@ pub trait DioxusRouterExt<S> {
|
||||
/// .unwrap();
|
||||
/// }
|
||||
///
|
||||
/// fn app(cx: Scope) -> Element {
|
||||
/// fn app() -> Element {
|
||||
/// todo!()
|
||||
/// }
|
||||
/// ```
|
||||
@@ -379,7 +379,7 @@ fn apply_request_parts_to_response<B>(
|
||||
/// use dioxus::prelude::*;
|
||||
/// use dioxus_fullstack::{axum_adapter::render_handler_with_context, prelude::*};
|
||||
///
|
||||
/// fn app(cx: Scope) -> Element {
|
||||
/// fn app() -> Element {
|
||||
/// render! {
|
||||
/// "hello!"
|
||||
/// }
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
//! }
|
||||
//! }
|
||||
//!
|
||||
//! fn app(cx: Scope) -> Element {
|
||||
//! let text = use_state(cx, || "...".to_string());
|
||||
//! fn app() -> Element {
|
||||
//! let text = use_state(|| "...".to_string());
|
||||
//!
|
||||
//! cx.render(rsx! {
|
||||
//! button {
|
||||
@@ -199,7 +199,7 @@ pub trait DioxusRouterExt {
|
||||
/// .await;
|
||||
/// }
|
||||
///
|
||||
/// fn app(cx: Scope) -> Element {todo!()}
|
||||
/// fn app() -> Element {todo!()}
|
||||
/// ```
|
||||
fn serve_dioxus_application<P: Clone + serde::Serialize + Send + Sync + 'static>(
|
||||
self,
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
//! }
|
||||
//! }
|
||||
//!
|
||||
//! fn app(cx: Scope) -> Element {
|
||||
//! let text = use_state(cx, || "...".to_string());
|
||||
//! fn app() -> Element {
|
||||
//! let text = use_state(|| "...".to_string());
|
||||
//!
|
||||
//! cx.render(rsx! {
|
||||
//! button {
|
||||
@@ -175,7 +175,7 @@ pub fn register_server_fns(server_fn_route: &'static str) -> BoxedFilter<(impl R
|
||||
/// warp::serve(routes).run(([127, 0, 0, 1], 8080)).await;
|
||||
/// }
|
||||
///
|
||||
/// fn app(cx: Scope) -> Element {
|
||||
/// fn app() -> Element {
|
||||
/// todo!()
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@@ -11,8 +11,8 @@ use serde::{de::DeserializeOwned, Serialize};
|
||||
/// use dioxus::prelude::*;
|
||||
/// use dioxus_fullstack::prelude::*;
|
||||
///
|
||||
/// fn app(cx: Scope) -> Element {
|
||||
/// let state1 = server_cached(cx, || from_server(|| {
|
||||
/// fn app() -> Element {
|
||||
/// let state1 = server_cached(|| from_server(|| {
|
||||
/// 1234
|
||||
/// }));
|
||||
///
|
||||
|
||||
@@ -24,7 +24,6 @@ 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, D>(
|
||||
cx: &ScopeState,
|
||||
dependencies: D,
|
||||
future: impl FnOnce(D::Out) -> F,
|
||||
) -> Option<&UseServerFuture<T>>
|
||||
@@ -128,7 +127,7 @@ impl<T> UseServerFuture<T> {
|
||||
}
|
||||
|
||||
/// Forcefully cancel a future
|
||||
pub fn cancel(&self, cx: &ScopeState) {
|
||||
pub fn cancel(&self) {
|
||||
if let Some(task) = self.task.take() {
|
||||
cx.remove_future(task);
|
||||
}
|
||||
|
||||
@@ -9,10 +9,9 @@ use tokio::sync::{
|
||||
#[derive(Clone)]
|
||||
pub struct HotReloadState {
|
||||
// The cache of all templates that have been modified since the last time we checked
|
||||
pub(crate) templates:
|
||||
Arc<RwLock<std::collections::HashSet<dioxus::prelude::Template<'static>>>>,
|
||||
pub(crate) templates: Arc<RwLock<std::collections::HashSet<dioxus::prelude::Template>>>,
|
||||
// The channel to send messages to the hot reload thread
|
||||
pub(crate) message_receiver: Receiver<Option<Template<'static>>>,
|
||||
pub(crate) message_receiver: Receiver<Option<Template>>,
|
||||
}
|
||||
|
||||
impl Default for HotReloadState {
|
||||
|
||||
@@ -49,7 +49,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
fn default_external_navigation_handler() -> fn(Scope) -> Element {
|
||||
fn default_external_navigation_handler() -> fn() -> Element {
|
||||
dioxus_router::prelude::FailureExternalNavigation
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ where
|
||||
{
|
||||
#[serde(skip)]
|
||||
#[serde(default = "default_external_navigation_handler")]
|
||||
failure_external_navigation: fn(Scope) -> Element,
|
||||
failure_external_navigation: fn() -> Element,
|
||||
scroll_restoration: bool,
|
||||
#[serde(skip)]
|
||||
phantom: std::marker::PhantomData<R>,
|
||||
|
||||
Reference in new issue
Block a user