Is it mandatory to define constructor for React component?

No, it is not mandatory. i.e, If you don’t initialize state and you don’t bind methods, you don’t need to implement a constructor for your React component.


Author of content
Edit this page

Made by Michael Sakhniuk

Twitter