mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
can save a lookup here
This commit is contained in:
parent
705ea3a3bb
commit
a50c6b0140
1 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
use futures::{stream::once, Stream, StreamExt};
|
use futures::{stream::once, Stream, StreamExt};
|
||||||
use hydration_context::SsrSharedContext;
|
use hydration_context::{SharedContext, SsrSharedContext};
|
||||||
use leptos::{
|
use leptos::{
|
||||||
nonce::use_nonce,
|
nonce::use_nonce,
|
||||||
reactive_graph::owner::{Owner, Sandboxed},
|
reactive_graph::owner::{Owner, Sandboxed},
|
||||||
|
@ -81,7 +81,9 @@ pub fn build_response<IV>(
|
||||||
where
|
where
|
||||||
IV: IntoView + 'static,
|
IV: IntoView + 'static,
|
||||||
{
|
{
|
||||||
let owner = Owner::new_root(Some(Arc::new(SsrSharedContext::new())));
|
let shared_context = Arc::new(SsrSharedContext::new())
|
||||||
|
as Arc<dyn SharedContext + Send + Sync>;
|
||||||
|
let owner = Owner::new_root(Some(Arc::clone(&shared_context)));
|
||||||
let stream = Box::pin(Sandboxed::new({
|
let stream = Box::pin(Sandboxed::new({
|
||||||
let owner = owner.clone();
|
let owner = owner.clone();
|
||||||
async move {
|
async move {
|
||||||
|
|
Loading…
Reference in a new issue