Javascript and wp-lemon
wp-lemon comes with a healthy dose of dependencies in the form of Bootstrap and Swiper. You can use any of these libraries inside your own project to create an extra UI element. But you can also add more custom code as well. In this chapter we will go over how to do that.
Since 3.3 wp-lemon is vanilla javascript. This means that if you write vanilla javascript as well, your there isn't depending on jQuery anymore which saves loading time. To achieve the same in themes created prior to wp-lemon 3.3 and child theme 3.1 you will need to make some changes in your app.js
Add components/code
You can create new .js files inside the components folder, export it's functions and import them inside the domReady hook in app.js. For additional js in the backend you can do the same in editor.js
Available javaScript helpers
wp-lemon provides several JavaScript helper functions that you can use in your blocks. You can find the full documentation for these functions in the JavaScript Functions Reference.