Finally WordPress recommends against using jQuery.

This week WordPress published this post on the make.wordpress.org blog recommending against using jQuery in WP Themes. If you have been following our blog we have cited several reasons for the need to migrate away from jQuery and which page builders heavily rely on jquery.

The number 1 reason cited is performance issues and it is important to understand what performance issues they are talking about. The performance metric described is the LCP which is the largest content-ful paint . This is the same metric which Google recommends for SEO results.

The LCP is an important metric, which means it is also evaluating how performant your CSS and Javascripts are when the pages are loaded, so it is not just about “caching things” it is the end User experience that matters.

I have to admit that jQuery is simple and easy to use. What you can achieve in 2-3 lines of code, in React it takes a full 20-30 lines of code. Although creating complex logic is easier in react vs jQuery but it ultimately depends on your architecture not the front end script.

WordPress Plugins

Now, the same recommendation can also be applied on Plugins. Majority plugins at the moment use jQuery, in WordPress when you enqueue jQuery you also enqueue the jQuery, jQuery – migrate. Popular plugins like BeaverBuilder, Elementor, Divi, use jQuery as their main script powering attractive features. If you are using Drag drop feature using jQuery like popular plugins LearnPress, Learndash etc. then you also enqueue tons of jQuery scripts from jquery-ui,jquery-ui-sortable,jquery-ui-draggable (created in 2007). I doubt if majority sites currently using WordPress would they be able to migrate away from jQuery, even WooCommerce uses jQuery.

Current state of web, you do not need jquery at all. Everything that jQuery does is easily possible using core javascript. From regular click tracking to drag drop. See below Vibe Projects addon creates a Trello like Kanban board using HTML5’s core Drag and drop in javascript.

Vibe Projects uses native HTML drag drop for web & mobile

Disclaimer : Self Advertisement : WPLMS is one of the very few themes which come with the No Jquery mode. This was added in verison 4 when we shifted our framework to reactJs 17 (released 2020) and Progressive web apps framework.

no jquery mode in WPLMS

we have been

October 7, 2021

0 responses on "Finally WordPress recommends against using jQuery."

Leave a Reply

top
Template Design © VibeThemes. All rights reserved.
%d bloggers like this: