DEV Community

Discussion on: State Management: How to tell a bad boolean from a good boolean

 
damms005 profile image
Damilola Emmanuel Olowookere

It seems you do not get my point. The case you made with good booleans, as I said, is the way to go. I am not arguing that. I am only trying to understand the statement you made with The code you describe will still result in the bug described in the article. Assuming good boolean is not to be used for whatever reason, according to that statement, setting isLoading=false in .finally() will still cause bug. I do not think so

Thread Thread
 
mattpocockuk profile image
Matt Pocock

No - your approach would cause a different bug - you'd need to set isComplete to false at the start to fully ensure that the states were not mutual. As well as doing a similar thing for the errors. I think we both agree on the main point of the article.