Uppercase component

This is not a question, is more a possible problem.

I create a component like this:


namespace App\Http\Livewire;

use Livewire\Component;

class UserSearch extends Component
     public function render()
        return view('livewire.user-search');

If I try to use this like

livewire:usersearch or livewire:UserSearch I receive and error that say.


I need to change it to lowercase to make it work.

class usersearch extends Component

Is this normal?

No that is not normal. Can you give us some more code context in what you are trying to do?

If you are talking about using the component in a view, livewire uses the kabob string just like the livewire view file, not the camel case the component file uses. In your case, livewire:user-search

How are you trying to use the component in your blade file?

<!-- Like this? -->

No, I use

<livewire:usersearch> or <livewire:userSearch>

@xxdalexx is a correct response, livewire use kabob string

Thanks all.