To add inline styles to an object, insert it into the style
attribute as an object
import './App.css';
function App() {
return (
<div className="App">
<header className="App-header">
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a style={{
padding: '10rem' ,
background: 'white' ,
color: 'magenta' ,
}}
className="App-link"
href="https://reactjs.org" target="_blank" rel="noopener noreferrer">
Learn React
</a>
</header>
</div>
);
}
export default App;
**Remember
class
is a keyword in javascript so we use className
camelcased
Clear the App.css
files
Get css from his repo and paste it in, or make your own
Create basic page in App.js
import './App.css'; function App() { return ( <div className="App"> <div className="content"> <h1>App Content</h1> </div> </div> ); } export default App;
Make sure you have an
export default App
at the bottom