green6060/digicert-public-library-demo

parameters

Opened this issue · 0 comments

onClick={() => dispatch(decrement())}

Hey I have an amazing idea... lets set a piece of state, which is a number, that theoretically could be changed, but of course I'm never changing it anywhere it's nowhere needed dynamically. And then we'll call a function... lets say decrement... which hopefully will change with the same number... but I won't pass that in to the function called decrement, you know... in case i ever want to have it controlled in one place... hmm somehow i changed my number to 5, but any time i hit the button it still only decrements by 2???? how'd that happen?