You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

create-error.tsx 300B

123456789101112131415
  1. export default function CreateError(): JSX.Element {
  2. return (
  3. <div>
  4. <button
  5. onClick={() => {
  6. if (window.confirm('Cause an error?')) {
  7. throw Error('You caused an error!')
  8. }
  9. }}
  10. >
  11. Create an Error
  12. </button>
  13. </div>
  14. )
  15. }