title: Livewire Error: public property [message] must be of type: [numeric, string, array, null, or boolean]
body: <p>I am getting this issue, and I don't understand what I am doing wrong as I did this same exact approach for another component on this site, and works perfectly....
  <img src="https://i.gyazo.com/2387fd7efb8c64b1c66abf591559e785.png" alt="" /></p>
  <p><strong>ViewMessages.php</strong></p>
  <pre><code>public $messages;
  
  public function mount($messages)
      {
          $this-&gt;messages = $messages;
      }
  </code></pre>
  <p><strong>view-messages.blade.php</strong></p>
  <pre><code>&lt;div class=&quot;flex flex-col&quot;&gt;
          @foreach ($messages as $message)
                  {{$message-&gt;content}}
          @endforeach
  &lt;/div&gt;
  </code></pre>
  <p>Everything works and it outputs all the messages correctly.</p>
  <p>When I try and pass in a livewire component into the for each, it gives that error.</p>
  <pre><code>@foreach ($messages as $message)
         @livewire('chat.show-message', ['message'=&gt;$message], key('show-message-'.$message-&gt;id))
  @endforeach
  
  // ShowMessage.php
  public $user;
      public $message;
      public $user_id;
      public $content;
    
  
      public function mount($message)
      {
          $this-&gt;message = $message;
      }
  
  </code></pre>
  <p>Honestly am lost on what I am doing wrong, as I copied the exact same code and changed the variables that I used before. It works right now on the site when I do nested components.</p>
  <pre><code>&lt;div class=&quot;flex flex-col space-y-4 py-4 overflow-y-auto&quot;&gt;
       @foreach ($chats as $chat)
            @livewire('kanbans.show-sidebar-chat-message', ['chat'=&gt;$chat], key('chat-'.$chat-&gt;id))
       @endforeach
  &lt;/div&gt;
  </code></pre>
  <p>I redid this component already twice, and can't find any syntax issues or spelling errors. =/</p>