Midwest JS

Jim

Building a ‘Select All’ React Hook for your Table

The power of React hooks is being able to encapsulate a set of state and side effects together, giving them a name and reusing them. Let’s build a non-trivial but commonly needed unit of functionality for your tables: the infamous ‘Select All’ checkbox at the top of a table with selectable rows.