+ 1
What is wrong with this code?
2 ответов
+ 6
Just read Caviղ's answer:)
Maybe your code is supposed to look like this:
<Removed after Caviղ's reply>
If that's what you want then you have 2 problems in your code.
-First:
You forgot "this" in line 61.
-Second:
Line 43 in your code. That syntax is a named line of code that does nothing. "increase: " here is a label not an object property. Use state.increase to access its property.
I'm a React noob.
Maybe there's better way.
Feel free to correct me ;-)
+ 2
this.state should be initiated in constructor()
https://code.sololearn.com/WDN92VSYID2P/?ref=app