UNPKG

tanstack-shadcn-table

Version:

A powerful, feature-rich React table component built on top of TanStack Table v8 with shadcn/ui styling. Optimized bundle size with 55% reduction through peer dependencies.

2 lines (1 loc) 240 B
import{useRef as t,useCallback as r}from"react";function e(e=10,n=1e3){const o=t([]);return r(()=>{const t=Date.now();return o.current=o.current.filter(r=>n>t-r),o.current.length<e&&(o.current.push(t),!0)},[e,n])}export{e as useRateLimit};