It's encouraged to access the previous state from within the parameter of the setState function to assure that you are working with the most recent state value.
Counter value: 0