Buckets:
| import React from 'react' | |
| class Error extends React.Component { | |
| static getInitialProps({ res, err }) { | |
| const statusCode = res ? res.statusCode : err ? err.statusCode : null | |
| return { statusCode } | |
| } | |
| render() { | |
| return ( | |
| <> | |
| <h3>Custom error!!</h3> | |
| <p> | |
| {this.props.statusCode | |
| ? `An error ${this.props.statusCode} occurred on server` | |
| : 'An error occurred on client'} | |
| </p> | |
| </> | |
| ) | |
| } | |
| } | |
| export default Error | |
Xet Storage Details
- Size:
- 494 Bytes
- Xet hash:
- 644665a5e3d05713c93fec35d203fb515b9facbe02ecc17b51be6dbabcedd7f6
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.