handling props in class components reactjs ijnterview questions code example
Example: handling props in class components reactjs ijnterview questions
class StudentInfo extends React.Component{
constructor(props){
super(props);
}
render(){
return(
<div className="main">
<h2>{this.props.name}</h2>
<h4>{this.props.rollNumber}</h4>
</div>
)
}
}