Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

state creation in class components reactjs interview questions

class Car extends React.Component{
 constructor(props){
   super(props);
   this.state = {
     brand: "BMW",
     color: "black"
   }
 }
}
Source by www.interviewbit.com #
 
PREVIOUS NEXT
Tagged: #state #creation #class #components #reactjs #interview #questions
ADD COMMENT
Topic
Name
9+1 =