Tirraa / dashboard_rtm

dashboard_rtm
MIT License
5 stars 1 forks source link

[Bundle Size] Inject imported values via the server instead of retrieving them via client components #119

Open gustaveWPM opened 5 months ago

gustaveWPM commented 5 months ago

I wasn't aware of that, even if it sounds stupid now.

Importing a value from a client component increases the bundle size (first-load JS). Injecting this value to a client component via a server component decreases the bundle size (first-load JS).

I bet there are a lot of insidious smells in the code regarding this perf concern.

gustaveWPM commented 3 months ago

Minor refactor: https://github.com/Tirraa/dashboard_rtm/commit/2d3bbdeaa7ea8a65a1aa742714ab9a7427df0ea9