This pull request improves the user experience when people are trying to use Folio's pages combined with Volt's anonymous components. In the example below, using the following component:
<?php
use Livewire\Volt\Component;
new class extends Component {
public $count = 0;
public function increment()
{
$this->count++;
}
} ?>
<x-app-layout>
<div style="text-align: center">
<button wire:click="increment">+</button>
<h1>{{ $count }}</h1> // <---- ERROR EXCEPTION : Undefined variable $count
</div>
</x-app-layout>
This pull request improves the user experience when people are trying to use Folio's pages combined with Volt's anonymous components. In the example below, using the following component:
And visiting the page "/counter",
Before:
After: