13

Got asked to fix a bug at work. The code (react) looked like this:

file = form.file;
this.setState({file});
this.methodThatNeedsFile();

So i explained that the changes from setState are not adopted immediately etc. Then i take another look at the code and feel the pain in my head. You could shorten the code to:

this.methodThatNeedsFile(form.file);

Is there some subconscious need in the brain to make use of frameworks even though it makes no goddamn sense and "normal" programming is sufficient?

Comments
Add Comment