Articles → REACT.JS → Sass In React.Js
Sass In React.Js
Purpose
Example
$Color: red;
h1 {
color: $Color;
}
import React, { Component } from 'react';
import ReactDOM from 'react-dom'
import './style.scss';
class FormComponent extends React.Component {
render() {
return (
<h1>Hi</h1>
);
}
}
ReactDOM.render(<FormComponent />, document.getElementById('root'));
Output
Click to Enlarge