is anyone can explain what is the benefit of using function update vs direct update to state ? .i think it's alittle bit complex for me.can i get any example for better understanding ?
setCount(++count);
setCount(prevCount=>++prevCount);//what is the benefit of using this