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