Following your example, everythign works, but when I try to add <button wire:click="$emit('closeModal')">Close Modal</button> and click the button, it throws an error in the console and freezes. Here's the error.  
Following your example, everythign works, but when I try to add
Close Modal
and click the button, it throws an error in the console and freezes. Here's the error.

