Q. What is the correct syntax to define state in a class component?

क्लास घटक में राज्य को परिभाषित करने के लिए सही वाक्यविन्यास क्या है?

A
this.state = { count: 0 };
B
state = { count: 0 };
C
setState({ count: 0 });
D
{ count: 0 }

Explanation

Explanation will be available soon. Please stay tuned.

व्याख्या जल्द ही उपलब्ध होगी। कृपया बने रहें।

Invest in Future Achievers

Your support helps keep Exam Achiever 100% free for students preparing for exams.

Thanks for your support!

Comments

Leave a Comment