RomanFedytskyi/use-flash-cells: v1.0.0 — First stable release
Authors/Creators
Description
Never write a DIY price-flash loop again.
Headless React hook that tracks which cells in a data table changed value and exposes 'up' | 'down' | null flash direction per cell — drops in alongside MUI DataGrid, TanStack Table, react-data-grid, or any renderer in under 5 lines. Zero runtime dependencies. < 1 KB gzipped.
Highlights
- Headless — returns state only; you own the DOM, the styles, and the animation. Nothing injected, no component to wrap.
- Renderer-agnostic — one
getFlash(rowId, field)call per cell renderer, compatible with MUI DataGrid, TanStack Table, adazzle/react-data-grid, or a plain<table>. - NaN-safe — fields with
undefinedor non-numeric values are silently ignored; no spurious flashes on missing data. - Timer reset on rapid updates — the clear-timer resets on every new value so the flash never cuts short mid-burst.
- Zero runtime dependencies — single peer dependency:
react >= 16.8. Bundle is < 1 KB gzipped. - Interactive demo — open
demo/index.htmlin any browser, no build step required.
Guarantees
First render · New rows · Rapid updates · Unmount · NaN/undefined fields · Row removal mid-flash — all documented and covered by 30 Vitest tests across 2 suites (unit + stress). See the Behaviour guarantees table in the README.
Install
npm install use-flash-cells
Peer dependency: react >= 16.8. No @types/ package needed — types are bundled.
Notes
Stable public API from this release forward; breaking changes will bump the major version. MIT license.
Full changelog: CHANGELOG.md
Files
RomanFedytskyi/use-flash-cells-v1.0.0.zip
Files
(144.6 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:cf908adbbd143deee3dce5622b00d9a8
|
144.6 kB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/RomanFedytskyi/use-flash-cells/tree/v1.0.0 (URL)
Software
- Repository URL
- https://github.com/RomanFedytskyi/use-flash-cells