Hacker News new | ask | show | jobs
by Yahivin 4393 days ago
That issue about requiring a root item should be solvable in the future, it's just the current implementation that has limitations. I'm building up the test suite to specify the behavior and hope to have it working soon.

For the most part jQuery plugins should work fine with Hamlet, so long as one remembers to update the data in the model rather than arbitrarily throughout the DOM. It can be a moderate mental shift to go from jQuery style "The DOM is the data" to the newer Backbone, Knockout, React, Angular, etc style of "The model is the data" and may not be right for all applications.

Thanks for the comment I'll take a look at Meteor Blaze and see what cool tricks it has :)

1 comments

The problem is that most current jQuery plugins modify the DOM. If someone want to use a jQuery carousel, the plugin will add arrows buttons and page indicators in the DOM. Then if the template engine updates one of the carousel slide, these nodes will be removed and the plugin will be broken.
My advice for that kind of application would be to have a piecemeal approach. Use Hamlet for some templates on your page, and jQuery plugins for others. I hope it's modular enough to use as little or as much as you like.