Remove argument from use_hook closure (#496)
Also; update docs for said function
This commit is contained in:
1 parent
6ea076fa7f
commit
d734dc5b46
29 files changed
+53
-55
No files matched your search
@@ -28,10 +28,10 @@ pub struct RouteProps<'a> {
|
||||
/// ```
|
||||
pub fn Route<'a>(cx: Scope<'a, RouteProps<'a>>) -> Element {
|
||||
let router_root = cx
|
||||
.use_hook(|_| cx.consume_context::<Arc<RouterCore>>())
|
||||
.use_hook(|| cx.consume_context::<Arc<RouterCore>>())
|
||||
.as_ref()?;
|
||||
|
||||
cx.use_hook(|_| {
|
||||
cx.use_hook(|| {
|
||||
// create a bigger, better, longer route if one above us exists
|
||||
let total_route = match cx.consume_context::<RouteContext>() {
|
||||
Some(ctx) => ctx.total_route,
|
||||
|
||||
Reference in new issue
Block a user