Description
Ref this issue #3702, our initial attempt to add 'use client' would not work in next.js, instead we discovered that sub components (such as Table.Header) are undefined.
@sebastianvitterso started this discussion at vercel and then discovered this article which gets to the bottom of the problem and proposes a couple of solutions.
I think most realistically, exporting the subcomponents individually is how we should go about it. This is also how they've done it over at Designsystemet (example).
Note also that individual exports have been requested in the past, but then the reasoning was to easier create jest tests downstream, so we denied the request for being not worth the effort. However, supporting ssr is perhaps a bit more important, so we should reconsider.