Zero-Bundle-Size React Server Components
My biggest concern is separating the concerns via file naming convention and relying on presumably linter plugins to enforce its rules and on modifications to packagers, rather than something that can be used more directly in a type system and can more directly resemble ordinary tree-shaking.<p>I don&#x27;t have a strong counter-proposal off the top of my head, but I do think the RFC is too quick to dismiss async&#x2F;await and dynamic imports.<p>async&#x2F;await makes a lot of sense to differentiate server-side components (Promise&lt;T&gt; returns would be a very different type of return from current components), many things you would use server like DB access would want you to use Promises today. (That seems a clear problem with the server side examples as presented in the RFC: they use synchronous node &#x27;fs&#x27; instead of FS Promises, and some sort of synchronous &#x27;db&#x27; that looks less and less like any modern Node db provider.) There&#x27;s even a possible intuition pump there that hooks &quot;obviously&quot; won&#x27;t work in an async function making it easier to keep the rules in mind between the types of components. If the components are then async&#x2F;await by &quot;requirement&quot;, dynamic imports stop looking so out of place and start to look much more correct in the component body.