Svelte: using jQuery plugin with Action API


You may have used jQuery in your projects before, however, with the advancements in Frontend frameworks, we are sort of forced to forget about the vast ecosystem of jQuery and its plugins. And the main reason is that your framework of choice is not compatible with jQuery or does not have a jQuery friendly API out of the box. So we either look for an alternative library that is written from scratch or a wrapper library on top of jQuery/Javascript plugin written in your framework of choice. However, Svelte is a different beast and it has something called Action API that lets you use/consume jQuery/Javascript plugin without much framework-related overhead.

I had tweeted my wild prediction last time which what I have show-cased in this tutorial video.

You can watch the video below👇 to see it in action or grab the source code from Github.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.