Frage im Vorstellungsgespräch bei HyScaler

What's the difference between useEffect and useState in react?

Antwort im Vorstellungsgespräch

Anonym

27. Aug. 2024

My answer is like UseEffect will render the UI automatically but while useState you need to perform any event like button pressed or text input. UseEffect can also do the same but we don't need to call that.