RE

React Error Boundary

react-error-boundary

Simple reusable React error boundary component

Tables
react
reactjs
virtual
window
windowed
list
scrolling
infinite
virtualized
table
Stars
8.0k
Weekly
13M
Open issues
0
Bundle
~15 kB

Installation

npm install react-error-boundary

Code example

import { useErrorBoundary } from "react-error-boundary";

const rows = [
  { id: 1, name: "Ada", role: "Engineer" },
  { id: 2, name: "Linus", role: "Maintainer" },
];

export function Example() {
  const table = useErrorBoundary({ data: rows, columns: [{ accessorKey: "name" }, { accessorKey: "role" }] });
  return <pre>{JSON.stringify(table, null, 2)}</pre>;
}

Pros & cons

Pros

  • Actively maintained by Brian Vaughn
  • 13M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~15 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 0 open issues on GitHub

FAQs

Alternatives & similar libraries