There's usually no render function to call in these types of frameworks as far as I understand (my experience being a little Svelte).
I imagine in your scenario the psuedo code to achieve what you want would be written.
list2 = bubble_sort(list1)
removeItem = () => delete list2[random index]
...
<for each list2 render div>
The compiler will see a change to the list2 variable anywhere that removeItem is called and annotate the code to make the appropriate changes to the dom in the function call and the bubble_sort line will never be re-run unless it was explicitly added to the removeItem function.