2 ms·
Performance is, or should be, a reason to use server components. I don’t think SEO is a factor (SSR is relevant there, not server components) Imagine a tree-ba
by afavour 3y ago
Performance is, or should be, a reason to use server components. I don’t think SEO is a factor (SSR is relevant there, not server components)
Imagine a tree-based navigation component. It’ll render out a series of <a> tags, probably nested inside <ul>s and <li>s. Then the initial page state JS blob will contain the exact same information so that React can, somewhat uselessly, hydrate this tree-based navigation component. So page load is slower because it has to parse the state info then run a load of useless VDOM diffing against an already complete DOM.
This has long been an irritation of mine with React. It’s all so unnecessary but React makes it really difficult to have part of your page render statically. At least server components are an attempt to fix that.
- parhamn 3y ago> I don’t think SEO is a factor (SSR is relevant there, not server components) Ah, yes thanks for that clarification and your comment.