Handling Errors
import { useContext } from 'react';
import { ViewContext } from 'components/lib';
function YourComponent(props){
const viewContext = useContext(ViewContext);
function doSomething(){
try {
...
}
catch (err){
viewContext.handleError(err);
}
}
}Last updated