In this case, the setCount function is taking another function which takes the cout as a param and return a decreased count by 1.
Which is kind of passing a redundant method to the setCount function.
You can simply pass the new value of count as an argument to the SetCount when calling it
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Shouldn't it be
setCount(count=>count-1)?In this case, the setCount function is taking another function which takes the cout as a param and return a decreased count by 1.
Which is kind of passing a redundant method to the setCount function.
You can simply pass the new value of count as an argument to the SetCount when calling it