question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export cx from `@emotion/core`

See original GitHub issue

Hi, would you accept a PR that makes cx a top level export from @emotion/core?

Right now to use it you have to either use <ClassName> or the emotion package.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
Eastoniumcommented, Aug 20, 2020

I’m currently trying to use vanilla emotion’s cx as a direct replacement for the classnames library. I’m not using it on styles generated by emotion, just for strings + objects. Should I still switch to using the cx provided by the ClassNames component’s render prop function? Honestly I’m hesitant because the ClassNames component with its render function is awfully bulky and ugly.

0reactions
FezVrastacommented, Feb 14, 2019

Oh ok I see, it makes sense then. Sorry for the waste of time!

Read more comments on GitHub >

github_iconTop Results From Across the Web

emotion/css
The @emotion/css package is framework agnostic and the simplest way to use Emotion. ... Animation Keyframes — keyframes; Composing Class Names — cx....
Read more >
Why you shouldn't use @emotion/core - Colin McDonnell
It's easy to define style classes — both inline or in separate files. You can powerfully compose classes in powerful ways with the...
Read more >
@emotion/css - npm
Start using @emotion/css in your project by running `npm i @emotion/css`. There are 829 other projects in the npm registry using @emotion/css.
Read more >
emotion css feature is not rendering the styles (React)
However, if I try to use the native css`` feature it renders the object but not the styles. import { css, jsx }...
Read more >
How To Use Emotion for Styling in React | DigitalOcean
Learn how to style components in React using the emotion CSS-in-JS library.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found