New to Livewire 3 and needing to use inline javascripts but its not working.
on my layout.blade.php , i have added stack('scripts')
on my livewire component partial i have added
@push('scripts')
<script>
document.addEventListener('livewire:init', function () {
console.log('loaded');
});
</script>
@endpush
I also tried other events like livewire:initialize, livewire:load, DOMContentLoaded but still doesnt work.
I have been here for a few hours trying to solve this basic inline javascript. can anyone please help me?