1. First, we need fresh reactjs setup, and for that, we need to run below commands into out terminal, and also we should have latest node version installed on our system:
npx create-react-app my-awesome-project
cd my-awesome-project
npm start
2. Now we need to run below commands into our project terminal to get bootstrap and related modules into our reactjs application:
npm install [email protected] --save
npm start //For start project again
3. Finally for the main output, we need to add below code into our my-awesome-project/src/App.js file or if you have fresh setup then you can replace my-awesome-project/src/App.js file code with below code:
import React from 'react';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
function App() {
return (
<div>
</div class="container">
<div class="row">
<div class="col-md-12">
<article class="text-center">
<figure>
<img class="img-responsive img-circle img-thumbnail img-user" src="https://bootdey.com/img/Content/avatar/avatar7.png"/>
</figure>
<h3 class="text-primary">Hi.</h3>
<h4 class="text-info">My name is bootdey</h4>
<p>I'm a web designer / developer, love bootstrap, love html css js, I have a </p>
<p>passion for web design and love to create for web and mobile devices.</p>
</article>
</div>
</div>
</div>
</div>
);
}
export default App;
4. Now we need to add below code into our my-awesome-project/src/App.css file :
body{
background:#eee;
}
.img-user{
width:284px;
height:284px;
}