Prasanna Natarajan

Ajax Type Ahead in PlainJS vs VueJS

A while ago, a certain Wes Bos released a free Javascript course where he builds 30 apps using plain javascript.

The 6th exercise was to implement a simple ajax type ahead. I followed the exercise and refactored the code using module design pattern, and used proper forms of event listeners.

I also implemented it using Vue JS.

Here’s the Plain JS version

(click ‘Rerun’ and also open in a new tab to see the demo clearly:

See the Pen JS30 - 06 - Ajax Type Ahead - PlainJS by Prasanna N (@npras) on CodePen.


And here’s the Vue JS version:

See the Pen JS30 - 06 - Ajax Type Ahead - VueJS by Prasanna N (@npras) on CodePen.


Things I learned from this exercise