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
@@ -250,7 +250,7 @@ impl Runtime {
|
||||
|
||||
/// Pops a scope off the stack
|
||||
pub(crate) fn pop() {
|
||||
RUNTIMES.with(|stack| stack.borrow_mut().pop());
|
||||
RUNTIMES.with(|stack| stack.borrow_mut().pop().unwrap());
|
||||
}
|
||||
|
||||
/// Runs a function with the current runtime
|
||||
@@ -273,11 +273,10 @@ impl Runtime {
|
||||
/// Runs a function with the current scope
|
||||
pub(crate) fn with_scope<R>(
|
||||
scope: ScopeId,
|
||||
f: impl FnOnce(&Scope) -> R,
|
||||
callback: impl FnOnce(&Scope) -> R,
|
||||
) -> Result<R, RuntimeError> {
|
||||
Self::with(|rt| rt.get_state(scope).map(|sc| f(&sc)))
|
||||
.ok()
|
||||
.flatten()
|
||||
Self::with(|rt| rt.get_state(scope).map(|scopestate| callback(&scopestate)))
|
||||
.expect("Runtime should exist")
|
||||
.ok_or(RuntimeError::new())
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user