chore: finish tweaking context api

This commit is contained in:
Jonathan Kelley committed 2022-12-05 15:30:49 -08:00
1 parent 99a818996e
commit df4a1b6c7a
12 files changed
+76 -81

No files matched your search

+2 -4
View File
@@ -1,6 +1,4 @@
use std::sync::Arc;
use crate::{use_route, RouterCore};
use crate::{use_route, RouterContext};
use dioxus::prelude::*;
/// Props for the [`Link`](struct.Link.html) component.
@@ -77,7 +75,7 @@ pub struct LinkProps<'a> {
/// }
/// ```
pub fn Link<'a>(cx: Scope<'a, LinkProps<'a>>) -> Element {
let svc = cx.use_hook(|| cx.consume_context::<Arc<RouterCore>>());
let svc = use_context::<RouterContext>(cx);
let LinkProps {
to,