Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #587
    dan
    Participant

    Why is my Livewire component not updating the UI as expected?

    #590

    Ensure you are using the wire:model directive for two-way data binding and that your properties are correctly defined as public.

    Example:

    // Livewire component class
    class MyComponent extends Component
    {
    public $message;

    public function render()
    {
    return view(‘livewire.my-component’);
    }
    }

    <!– Blade view for MyComponent –>
    <div>
    <input type=”text” wire:model=”message”>
    <p>Message: {{ $message }}</p>
    </div>

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.