feat: add prevent default attribute and upgrade router
This commit is contained in:
1 parent
cb2782b4bb
commit
427b126bc1
16 files changed
+220
-181
No files matched your search
@@ -15,14 +15,13 @@ pub struct RouterProps<'a> {
|
||||
onchange: Option<&'a Fn(&'a str)>,
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn Router<'a>(cx: Scope<'a, RouterProps<'a>>) -> Element {
|
||||
let p = cx.use_hook(|_| {
|
||||
cx.use_hook(|_| {
|
||||
let update = cx.schedule_update_any();
|
||||
cx.provide_context(RouterService::new(update, cx.scope_id()))
|
||||
});
|
||||
|
||||
log::debug!("rendering router {:?}", cx.scope_id());
|
||||
|
||||
cx.render(rsx!(
|
||||
div { &cx.props.children }
|
||||
))
|
||||
|
||||
Reference in new issue
Block a user