Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: