What does HackerNews think of uPlot?

📈 A small, fast chart for time series, lines, areas, ohlc & bars

Language: JavaScript

Ha, the creator of uplot strikes again! Love seeing your stuff man, always so thorough and well-explained, nice work

(https://github.com/leeoniya/uPlot)

BACKEND:

It's about 3000 lines of Crystal code https://crystal-lang.org/ -- it's been an absolute dream to program in. Ruby-like syntax, statically compiled performance. Nice standard library. Would recommend :)

Performance == caching

Local ephemeral filesystem for shortest-term caching.

Redis for shared medium-term caching and locking.

S3-compatible object storage for longest-term caching (for raw data feeds pulled every evening by a cronjob).

FRONTEND:

Bootstrap

uPlot https://github.com/leeoniya/uPlot

Just a sprinkle of inline JS+CSS on the page.

One other common use for useRef that isn't mentioned here is to bridge your React component with a JS library outside the React ecosystem.

For example, if you wanted to instantiate a charting library like uPlot (https://github.com/leeoniya/uPlot) you might instantiate a uPlot object storing state and methods for the chart. You can perform the chart initialization in a useEffect hook, and use a ref to keep a reference to the instance you've created.