cloudflare/vinext

Public

mirrored from https://github.com/cloudflare/vinextAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.0.9

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

examples/hackernews/components/error-placeholder.jsx

12lines · modecode

1import { useEffect } from "react";
2
3export default function ErrorPlaceholder({ error }) {
4 useEffect(() => {
5 // Log the error to an error reporting service
6 console.error(error);
7 }, [error]);
8
9 return (
10 <span>{`Application error: a server-side exception has occurred`}</span>
11 );
12}
13