This is a demonstration of how to progressively enhance a data visualization!
The core idea can be seen by doing the following:
- Run
npm i && npm run setup && npm run dev
- Navigate to the invoices page
- Switch between invoices and notice the graph animates (you may need to add a few invoices first)
- Disable JS and switch between invoices: the graph should show up but no longer animate
The vast majority of this code comes from Kent C. Dodd's wonderful advanced-remix codebase, which has a nice demo Remix app.