[FEATURE-REQUEST] Use @stack directive
yokozawa0701 opened this issue · comments
Hi, We're using Alpine.js in my project.
And I like using Alpine.store()
with push directive rather than writing in HTML like below.
some-component.blade.html
<div data="darkMode"
<!-- some component -->
</div>
@push('scripts')
<script>
document.addEventListener('alpine:init', () => {
Alpine.store('darkMode', {
on: false,
toggle() {
this.on = ! this.on
}
})
})
</script>
@endpush
What do you think about making push directives available?
Hi! This should work out of the box. You'll need to publish the storybook.blade.php
layout to your app using php artisan vendor:publish --provider="A17\Blast\BlastServiceProvider" --tag="blast-views"
and then add the @stack
directive there.
Oh, it's has work very well! Thanks!