arosequist / om-autocomplete

An autocomplete component for Om
Apache License 2.0
61 stars 9 forks source link

Various bug fixes, updates, code restructuring #2

Closed jalehman closed 9 years ago

jalehman commented 9 years ago

Hello!

I've been using this as a replacement for Twitter's typeahead.js, and have to say I'm really pleased with it. The API design has proven really nice to use and decomplected from what I've seen in other js-based typeaheads.

I've made a number of changes to the underlying implementation. Most notably, I noticed that you were using a separate (go (loop [] ...)) for each internal channel. The problem with this is that go loops generate a lot of garbage, and all of these loops can be condensed to a single go loop that dispatches via alt!.

In addition, I found that breaking all of the inline logic contained within the will-mount protocol into separate functions greatly enhances readability.

In addition:

Thanks! -Josh

arosequist commented 9 years ago

Sorry, I've been away for a few days. Everything looks great, thanks a lot for the pull request.