Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

what is the use of consrtructors in reactjs

In React, constructors are mainly used for two purposes: It used for initializing the local state of the component by assigning an object to this. state. It used for binding event handler methods that occur in your component.
 
PREVIOUS NEXT
Tagged: #consrtructors #reactjs
ADD COMMENT
Topic
Name
9+1 =