News for hackers. Stuff that matters.
Re:React.js Introduction for People Who Know Just Enough JQuery by ups101 on Thursday July 09, 2015 @08:05AM (#9857352)
true, but to be fair, you'd probably also want to introduce variables like $addPhotoBtn, $tweetBtn, $textLengthLbl, etc, to avoid css queries on every keyboard change. That would add to solution length and also introduce a bind-step to avoid stale variables after a dom change.

Also, there's the authors very well-placed point that adding a new feature may lead to css query refactoring, eg. when $("textarea") doesn't cut it. I find html refactorings to be nb 1 cause for breaking progressively enhanced solutions like this one, probably bc I suck at naming elements.

Lastly, it should be noted that this refactored solution does not contain all the features of the final react solution.

There are no comments on this comment yet.