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.


Made in India with ❤️ by Rajesh Kumar Yadav

Twitter