make hooks return a result instead of an option
This commit is contained in:
5 files changed
+35
-26
No files matched your search
@@ -0,0 +1,8 @@
|
||||
/// Errors that may occur during routing.
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum RouterError {
|
||||
/// A hook that needs access to a router was called inside a component, that has no parent
|
||||
/// calling the [`use_router`](crate::hooks::use_router) hook.
|
||||
#[error("component needing access not inside router")]
|
||||
NotInsideRouter,
|
||||
}
|
||||
Reference in new issue
Block a user