import * as React from 'react' ; import { start , ErrorProps } from 'award' ; class App extends React . Component < any > { public render ( ) { throw 'error' ; } } class ErrorComponent extends React . Component < ErrorProps > { public static async getInitialProps ( ctx ) { ctx . loading = 'loading' ; return { name : 'hello error' } ; } public render ( ) { return < p > { this . props . data . name } < /p>; } } start ( App , ErrorComponent ) ;