Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

css in reactjs

Assuming you have 2 separate files: Example.css and Example.js

Use the '.' to reference a className that you'll use later 

.primary{
	color: red;
}

<h1 className="primary"> Hello, World </h1>

In this case "primary" in the className is referencing .primary in the CSS file
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #css #reactjs
ADD COMMENT
Topic
Name
5+6 =