Skip to content

Instantly share code, notes, and snippets.

@mjackson
Last active March 7, 2018 05:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjackson/49b04f20f521ba2a539ccffebb014b2b to your computer and use it in GitHub Desktop.
Save mjackson/49b04f20f521ba2a539ccffebb014b2b to your computer and use it in GitHub Desktop.
Can we just plop some CSS right smack in the middle of our JavaScript code?!
import React from "react";
body {
font-family: Helvetica, sans-serif;
}
.header-text {
font-weight: bold;
font-size: 2em;
}
class MyComponent extends React.Component {
render() {
return (
<div>
<h1 className="header-text">Hello there!</h1>
</div>
);
}
}
export default MyComponent;
@omermindivanli
Copy link

No you cannot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment