Created
June 3, 2017 07:19
-
-
Save k1r0s/f6f048ab85101894f1b4dd535c885e80 to your computer and use it in GitHub Desktop.
Handle exceptions in React components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import Sidebar from "../Sidebar/Sidebar.main"; | |
import Content from "../Content/Content.main"; | |
import { Advices } from "../../advices/Advices" | |
import { onException, afterMethod } from "kaop-ts" | |
export default class Root extends React.Component<null, null> { | |
@onException(Advices.blameCovfefe) | |
@afterMethod(Advices.throwOnError) | |
render(){ | |
return ( | |
<div className="mainContainer"> | |
<Sidebar /> | |
<Content /> | |
</div> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment