Re:Show HN: Way.js – Simple, persistent, framework-agnostic ...
by itry on Thursday August 14, 2014 @08:07AM
(#8177047)
Well, you can argue if 5 dependencies and 123 kilobytes of code is much or not. But what does it bring to the table? Your "sub-total" example would just need a normal javascript event handler. Lets say we are uber lazy and use jquery. Then it looks like this:
How does the way.js version look like? Im sceptical it makes it more elegant.
Re:Show HN: Way.js – Simple, persistent, framework-agnostic ...
by nissimk on Thursday August 14, 2014 @09:21AM
(#8177268)
I'm with you itry. Thanks for bringing this up here. These folks all want to avoid writing event handlers but these alternatives just make there be many levels of function calls between that actual user event and the developer's code to handle it. In addition to it being much slower, it's a lot harder to figure out what's happening when something goes wrong.
That being said, could an implementation be done without jQuery? Probably. I'm sure the author is open to pull requests if you want to give it a go.