-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove dot-notation support #346
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hi! Do you guys have more info on why this pattern should be avoided? Just found one post by @gaearon vercel/next.js#51593 (comment) that maybe Thanks for all the great work by the way! |
Hey, we love dot notation, but unfortunately, it doesn't work with RSC and we see no acknowledgement from framework maintainers like Next.js whether there are plans to fix it. We've had a few "bug reports" when people imported components with dot notation and couldn’t understand why it would blow up their app. Since right now the package is polluted with both export styles, it makes the experience in the IDE worse overall than having a single way to import the components. I wish it was the other way around as dot notation is an objectively better experience with multi-part components, but there is no point in having it if it doesn't work in modern frameworks and brings confused people to file bug reports here.
This can’t work for importing a specific component.
|
RIP dot notation. You were superior and you will be missed. 😞 |
Please note this isn't about any specific frameworks per se — there are no plans to fix it from the React side itself because patched-on properties like |
but is this a patched on property? I addressed this recently so that the Radix Themes exports use the module system: |
Were these bugs when using a version before #156? From the sounds of @gaearon 's post above and linked comment, #156 would resolve this |
Is there a linked issue or recreation, either here or upstream? I would be interested to try it out with a version that had #156 in it, e.g. 3.0.0-rc.14-patch.1 |
Ah interesting, I don't know whether |
So... we double checked and Glad that this discussion happened—we were operating on the assumption that this technique of re-exporting modules internally within the package wouldn't have changed anything, but we were wrong. In the hindsight it makes sense—exporting objects is not the same as group export, as object assignment happens at runtime. Guess it means we will be doing the opposite—we'll remove the individual part exports instead 🙂 |
This reverts commit a56bafb.
No description provided.