Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] Allowing Usage of Livewire Wire Boolean Style Directives #51007

Conversation

devajmeireles
Copy link
Contributor

Relates

Relates to #50994

Explanation

As we know, Livewire allows us to use some Boolean-style directives, that is, without any defined value, which is the case with directives such as: wire:poll, wire:loading, wire:loading.remove, etc. This PR aims to ensure that the use of these directives does not define their value as the name of the directive itself.

Before:

{{-- Using like this --}}

<x-fetch wire:poll />

{{-- Generates this HTML --}}

<div ... wire:poll="wire:poll" />

After this PR:

<x-fetch wire:poll />

<div ... wire:poll />

Although there are ways to deal with this - as mentioned by @driesvints in the issue, the work becomes overwhelming when we need to use directives like wire:poll (without specific value) several times.

Copy link
Member

@driesvints driesvints left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one!

@taylorotwell taylorotwell merged commit 7d40721 into laravel:11.x Apr 10, 2024
30 checks passed
@devajmeireles devajmeireles deleted the allowing-usage-of-wire-boolean-style-directives branch April 10, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants