Skip to content
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

[Beta] TabList fails to load in create-react-app because it uses component selectors #613

Closed
monken opened this issue Jun 9, 2020 · 7 comments
Assignees
Labels
🐞 bug Something isn't working as it should
Milestone

Comments

@monken
Copy link

monken commented Jun 9, 2020

Describe the bug

Component selectors require which is not readily available for apps using create-react-app

Steps to reproduce

Steps to reproduce the behavior:

  1. Load <TabList> component in a create-react-app

Specifications

  • Version: Beta-3

Additional context

https://github.com/sumup-oss/circuit-ui/blob/beta/src/components/Tabs/components/TabList/TabList.js#L46 seems to be thee culprit.

There might be more instances across the code base where component selectors are used.

@connor-baer
Copy link
Member

@monken Thank you for the report, this is very useful. I suspect it's because Circuit UI v2 is compiled with TypeScript instead of Babel and the Emotion Babel plugin is no longer applied to the code.

We'll fix this in Circuit UI, for the time being, I suggest to add the Babel plugin to your application and see if it works then.

@connor-baer connor-baer added the 🐞 bug Something isn't working as it should label Jun 10, 2020
@connor-baer connor-baer added this to the v2.0 milestone Jun 10, 2020
@connor-baer connor-baer self-assigned this Jun 10, 2020
@monken
Copy link
Author

monken commented Jun 10, 2020

Hi @connor-baer, for any create-react-app application that would mean you'd have to eject which is strongly discouraged. Without rejecting, you cannot modify the babelrc file and add custom plugins.

@connor-baer
Copy link
Member

That's not entirely true, you can use a custom Babel config without ejecting through react-app-rewired. I'm not suggesting this as a permanent solution — we will fix this before the stable v2 release.

@monken
Copy link
Author

monken commented Jun 10, 2020

awesome, didn't know about that one!

connor-baer added a commit that referenced this issue Jun 11, 2020
Since Circuit UI is no longer transpiled with Babel and the Emotion Babel plugin is no longer
applied, we can't use component selectors anymore.

Closes #613
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 2.0.0-beta.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@connor-baer
Copy link
Member

I'm going to close this issue since it has been resolved in the latest beta. @monken, please let us know if you encounter any other issues.

@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working as it should
Projects
None yet
Development

No branches or pull requests

2 participants