I have a page that displays a list of items, loaded with client-side fetch. There is also client-only logic:
- a top banner can be shown above the items (based on localStorage value)
- a feature flag is loaded from the third party service and can change the ui of the items
When I've migrated that page to Server Component and started to fetch items on the server, the behavior became worse.
Initially items are rendered on the server, but then client-only logic is applied. And it causes content shift and flickering:
- top banner shifts all items down
- after feature flag load items are flickering
What would be your suggestion for such case? Should I keep loading items with client-side fetch, or migrate to server component and use some technique to tackle these problems?
Thanks in advance!