How to update Alpine.js data from sort handler

There is a sort plugin for Alpine.js. I wanted to use this plugin to let the user sort a list and react to it by changing the Alpine reactive data ( x-data ). My first approach has been following code: <!-- NOT WORKING AS EXPECTED --> <! doctype html > < html lang =" en "> < head > < meta charset =" utf-8 " /> < meta name =" viewport " content =" width=device-width, initial-scale=1 " /> < script…