Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

alpine js update data

<script>
  // some other script on the page
  // using querySelector assumes there's only 1 Alpine component
  document.querySelector('[x-data]').__x.$data.items = [];
</script>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #alpine #js #update #data
ADD COMMENT
Topic
Name
5+5 =