visualization-tool
visualization-tool copied to clipboard
Server-side data fetching for published / embed charts
When accessing the published / embed chart pages, the application loads in ~0.5s. As we are using client-side data fetching for the charts, it means that we only start fetching the data after this time.
urql supports server-side data fetching and rehydrating the data to the client (see https://formidable.com/open-source/urql/docs/advanced/server-side-rendering/#nextjs). It might be worth to investigate whether it makes sense to switch to such rendering mode.
Pros:
- some time saved by not needing to wait until the page loads
Cons:
- for bigger charts, the page will be "frozen". When fetching the data client-side, we see a loading indicator