Добавить класс в React
/*App.jsx*/
import React from 'react';
export function App(props) {
return (
<div className='App'>
<h1 className="someClass">Hello React.</h1>
<h2>Start editing to see some magic happen!</h2>
</div>
);
}
/*style.css*/
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background-color: #18222d;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.App {
color: #72a24d;
}
.someClass
{
color: red;
}
Javasper