I cant understand what is difference between componentDidMount
and componentDidUpdate
I saw some counter app that use setState
method for increasing count value inside componentDidMount
so what if we write setState inside componentDidUpdate
?
and when should we use componentDidMount
or componentDidUpdate
?