Post

I reallyyyyy miss `import * as Dialog from ''` and <Dialog.Root>, <Dialog.Content> imports when working in RSC 😢 Both LOC and discoverability benefits. Any idea if there's a future for namespace imports in RSC?

0 reposts21 likes

what doesn’t work is attaching them to functions, like function Foo() { } Foo.Bar = function() { } <Foo.Bar /> however, actual namespace imports should be fine

Yeah they are + I believe that's the reason. I just wish there was a way the compiler could look at the code and see which ones are used. I guess by the time they're imported you can do dynamic things like Dialog[componentName]. So maybe it's a problem for editors to solve. Just so noisy!