My requirement is to use "x-if" to control whether the component is shown or not.
But if the variable "show" is false, and I try to click the button "Reload" to render the current component it will show the error: Uncaught component not found: shgVZbFOu1DZAz4Wm2mR
If the variable "show" is true, it works, why is this happening? How can I fix?
Since x-if removes the component from the DOM entirely, Livewire loses track of it. Instead, use x-show, which only hides the component while keeping it in the DOM:
Thanks for your reply.
I know x-show can work here, but for this page, I need x-if because I only need to load Google Maps Component(<livewire:goole-map />) when the user really needs it.