Expose Outlet Context (#3788)
* Expose Outlet Context * feat(router): expose OutletContext and use_outlet_context for improved accessibility * Hide OutletContext properties * Starts from 0 ? * Clippy fix with Default
This commit is contained in:
1 parent
f4c59e1188
commit
6a0ae17d56
3 files changed
+62
-32
No files matched your search
@@ -47,11 +47,10 @@ where
|
||||
|
||||
use_hook(|| {
|
||||
provide_router_context(RouterContext::new(props.config.call(())));
|
||||
});
|
||||
|
||||
provide_context(OutletContext::<R> {
|
||||
current_level: 0,
|
||||
_marker: std::marker::PhantomData,
|
||||
});
|
||||
use_hook(|| {
|
||||
provide_context(OutletContext::<R>::new());
|
||||
});
|
||||
|
||||
rsx! { Outlet::<R> {} }
|
||||
|
||||
Reference in new issue
Block a user