In this video we are going to learn about Nesting Components.
Nested components in React.js help you create more complex view element structures.
Lest see how can we use nested components.
So go to the project and inside the component.
Now create a new component.
Lets say component name is Student.js.
Now open Student.js and write the following code.

import React, { Component } from 'react'

class Student extends Component {
render() {
return (
<div>
<h3>Student Details</h3>
<p>Name: Jenifer</p>
<p>Email: jenifer@gmail.com</p>
<p>Phone: 1234567890</p>
</div>
)
}
}

export default Student;


Now add this Student component to the post component.
So inside the Post component first all import the Student component.
So just write here.


import Student from './ Student';


Now inside the render() method just add here.


< Student />


Now lets check so go to browser and you can see here the Student component inside the Post Component.
So in this way you can use nested Component.