0

Playing around with alpine.js and livewire I came across the following construction and I can't really figure out what it does

<div x-data="readConfig( { selectedKey: @entangle('filteredLocation') })" x-init="fetchOptions()"> 

and than in the script:

function readConfig(entangle) {
    
    return {
        ...entangle,
        filter: '',
       fetchOptions(){... }, 
        ...

The code works fine but I can't figure out what "...entangle" does in this case where it stands on its own in an object literal

β.εηοιτ.βε
  • 16,236
  • 11
  • 41
  • 53
JayEnn007
  • 1
  • 1
  • 3

0 Answers0