title: How to apply loading state only to particular component in livewire
body: <p>I'm using Laravel Livewire in my project, I use <code>wire:loading</code> for loading the state while clicking. I iterated all the tasks in foreach loop but the loading state applies for all components. Here is the code.</p>
  <p><a href="https://i.stack.imgur.com/abQHT.png" rel="noreferrer"><img src="https://i.stack.imgur.com/abQHT.png" alt="enter image description here" /></a></p>
  <p><strong>Blade file</strong></p>
  <p>GitLab: <a href="https://gitlab.com/tasklog/tasklog/-/blob/master/resources/views/livewire/home/tasks.blade.php" rel="noreferrer">https://gitlab.com/tasklog/tasklog/-/blob/master/resources/views/livewire/home/tasks.blade.php</a></p>
  <pre class="lang-html prettyprint-override"><code>&lt;button type=&quot;button&quot; wire:click=&quot;togglePraise({{ $task-&gt;id }}, {{ $task-&gt;user-&gt;id }})&quot;&gt;
      
      &lt;span class=&quot;small text-black-50 font-weight-bold&quot;&gt;
          {{ $task-&gt;task_praise-&gt;count() }}
      &lt;/span&gt;
      &lt;div wire:loading wire:target=&quot;togglePraise&quot;&gt;
          Processing...
      &lt;/div&gt;
  &lt;/button&gt;
  </code></pre>
  <p><strong>Controller file</strong></p>
  <p>GitLab: <a href="https://gitlab.com/tasklog/tasklog/-/blob/master/app/Http/Livewire/Home/Tasks.php" rel="noreferrer">https://gitlab.com/tasklog/tasklog/-/blob/master/app/Http/Livewire/Home/Tasks.php</a></p>
  <pre class="lang-php prettyprint-override"><code>public function togglePraise($id, $user_id)
  {
      if (Auth::check()) {
          if (Auth::user()-&gt;id === $user_id) {
              session()-&gt;flash('message', 'Forbidden!');
  
              return;
          }
          $isPraised = TaskPraise::where([
              ['user_id', Auth::user()-&gt;id],
              ['task_id', $id],
          ])-&gt;count();
          if ($isPraised === 1) {
              TaskPraise::where([
                  ['user_id', Auth::user()-&gt;id],
                  ['task_id', $id],
              ])-&gt;delete();
  
              return true;
          } else {
              TaskPraise::create([
                  'task_id' =&gt; $id,
                  'user_id' =&gt; Auth::user()-&gt;id,
              ]);
  
              return true;
          }
      } else {
          return session()-&gt;flash('message', 'Forbidden!');
      }
  }
  </code></pre>