Answers for "how to call livewire component"

PHP
0

livewire call another component

// component A
  public function functionCallComponentB(){
      $this->emit('callFunctionComponentB', 'optional_parameter');
  }

// component B
  public $listeners = [
      "callFunctionComponentB" => "functionReceiverCallFromComponentA"
  ];

  public function functionReceiverCallFromComponentA(){
      dd("called");
  }
Posted by: Guest on January-12-2022

Code answers related to "how to call livewire component"

Browse Popular Code Answers by Language