The following codepen has the methods on line 20 and line 32. When i click on the element that has the methods the input method will setstate immidiatly and show in the console but the handlesign method will show the same state as previous and then on the second click on that element will setstate like it should.
As you click on any numbers i.e. 6 it will log ‘6’ but and then click on ‘+’ it will log '6 + ’ but when you hit ‘7’ after that it will log '6 + ’ again and then after you click ‘7’ for the second time it will log ‘6 + 7’ like it should i can not figure out why?
Edit: updated link to show both console.log’s