restore error boundaries in core
This commit is contained in:
1 parent
1034377a6f
commit
d51b6268eb
1 file changed
+4
-3
@@ -1,6 +1,8 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
global_context::{consume_context, current_scope_id},
|
global_context::{consume_context, current_scope_id},
|
||||||
Element, IntoDynNode, Properties, ScopeId, Template, TemplateAttribute, TemplateNode, VNode,
|
innerlude::provide_context,
|
||||||
|
once, Element, IntoDynNode, Properties, ScopeId, Template, TemplateAttribute, TemplateNode,
|
||||||
|
VNode,
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{
|
||||||
any::{Any, TypeId},
|
any::{Any, TypeId},
|
||||||
@@ -13,8 +15,7 @@ use std::{
|
|||||||
|
|
||||||
/// Provide an error boundary to catch errors from child components
|
/// Provide an error boundary to catch errors from child components
|
||||||
pub fn use_error_boundary() -> ErrorBoundary {
|
pub fn use_error_boundary() -> ErrorBoundary {
|
||||||
// use_hook(|| cx.provide_context(ErrorBoundary::new()))
|
once(|| provide_context(ErrorBoundary::new()))
|
||||||
todo!()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A boundary that will capture any errors from child components
|
/// A boundary that will capture any errors from child components
|
||||||
|
|||||||
Reference in new issue
Block a user