plugin icon indicating copy to clipboard operation
plugin copied to clipboard

[Feature Request]: Warn or throw error when Livewire Component View doesnt have 1 root element

Open BVFI opened this issue 1 year ago • 1 comments

Feature Description

Note: This was asked before and was closed, but I think it should be re-opened.

Basically this. I couldnt find the documentation for Livewire 3, but v3 has the same issue(The issue being, it doesnt tell the user whats wrong). If the view starts with @if and @endif it would break the Livewire component even if it has 1 root element. As well as when there is more than 1 root element. This is easy to slip and miss for new users (As theres no mention of it in the Livewire 3 Docs, or I couldnt find it), there should be some kind of warning for it, but I would suggest a thrown error in the IDE.

What happens is that the whole thing breaks and it doesnt tell you why it broke. There should be at least some kind of indication.

BVFI avatar Jun 28 '24 08:06 BVFI

We may add inspection at least, I think. I'll pull this into internal task tracker for now

gorbunov avatar May 20 '25 18:05 gorbunov