Property Mutation in Alpine CSP
Direct property mutations within Alpine attributes, like @click="open = !open", are not allowed in Alpine CSP.
Instead, encapsulate the mutation logic within a method:
Tip
For reducing boilerplate with boolean toggles, see hyva.createBooleanObject.
Passing Arguments
Directly passing arguments to methods from Alpine attributes is not supported in Alpine CSP. Use data attributes to pass values instead.
Alpine variables like $event and x-for iteration variables (e.g., item) are accessible as properties of this within methods.