-
Epic
-
Resolution: Done
-
Must have
-
None
-
None
-
jQueryRemove
-
Sprint #150, Sprint #151, Sprint #152, Sprint #153, Sprint #154, Sprint #155, Sprint #156, Sprint #157
We load both jQuery and jQuery migrate on the front end, adding to our total bundle size and page render time.
Since most of jQuery functionality is now covered (better) by native JS, and dynamic behavior is better handled with React, it would make sense to replace any jQuery we use with native JS/React.
There is a likely a lot of jQuery that can be replaced with pure CSS solutions.
Additionally this is an opportunity to clean up code that poses performance issues, as older jQuery code often tends to be inefficient (i.e. too many DOM searches/manipulations). This guide on DOM reflow contains a lot of things to look out for (subsequent manipulations of same element, measurements being taken more often than needed).
Tasks:
- If any jQuery code can be done with pure CSS, apply it.
- If any jQuery code has a native JS equivalent, replace it with that (e.g. $.each, querySelector)
- Identify which jQuery should be removed in a separate ticket (because too much/too risky/involves using React instead...)
- blocks
-
PLANET-3640 Investigate: Use template literals when we have HTML markup inside JS
- Blocked