create-react-app dny-client
cd dny-client
npm start
You’ll see the default site.
Open your project with Code and remove these files:
- App.test.js
- ServiceWorker.js
- setupTests.js
- logo.svg
Edit these files to like so:
App.js
1 2 3 4 5 6 7 8 9 10 11 |
import React from 'react'; function App() { return ( <div> <h1>React Frontend</h1> </div> ); } export default App; |
index.js
1 2 3 4 5 |
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />, document.getElementById('root')); |
Go to Bootstrap Material.
We want to put the CSS into our index.html
copy and paste the link int the index.html
Add className container to your App and return the site.
You’ll be able to see some CSS take effect.
App.js
1 2 3 4 5 6 7 8 9 10 11 |
import React from 'react'; function App() { return ( <div className="container"> <h1>React Frontend</h1> </div> ); } export default App; |
React Router DOM
npm i react-router-dom