25+5 clock : 13 tests render script error (:0)


Wrote about this before. As far as I can tell my script works (well) but I’m not passing test 8 and 12 others. All of them give me the same error and this error is not telling me what I’m doing wrong. I don’t know what to make out of a script error.

I have noticed that I didn’t pass test 5 but when I enter a simple value 5 as starting value and not {this.state.break} which has the starting value of 5, then I do pass test 5. This technique does not help me to pass the other 12 script error tests though, especially test 8. And of course, now I can’t update anything anymore. So, I guess this is what you mean by a ‘default value of 5’ ? I feel that starting state at 5 and resetting to that value when I click on reset makes that a default value as well. This may be the big misunderstanding. I am quite new to react and I’m just sticking all the functions into the App component. The only thing it really does for me is that I can use a component twice (break and session). So I may not really be getting it but I don’t get what I’m not getting. I’m really stuck now. Before I refactor everything I’d like some confirmation that I’m on the right track.
This is the link : https://codepen.io/Mientje/pen/RwRJMPK?editors=0010
Thank you and greets,

Well, I replaced if else clauses that deal with “session-decrement”, “session-increment”… by a switch statement. Fiddled around a bit with the leading zero bit of the assignment and now the script errors have gone and are now replaced by other errors. They are not clear but I can find posts about them on the forum.