beyondcode / livewire-devtools

Chrome and Firefox DevTools extension for debugging Livewire applications
MIT License
417 stars 23 forks source link

Bugfix/Referencing unknown hook #11

Closed brunograndecom closed 3 years ago

brunograndecom commented 3 years ago

There is a issue (#9) raised when the console shows an error message on load: HookManager.js:30 Uncaught Livewire: Referencing unknown hook: [responseReceived]

The first commit of this branch fixes this issue.

Hooks changed in this commit: https://github.com/livewire/livewire/commit/0d09cd76aeb8ffda962cbc9d4d72d7c4191b5aae#diff-68e42dcf865615fada0655c8adbda6625cffa71aa5e060fb6757620be6201c91

"responseReceived" hook has been replaced with "message.received".


The other issue appears on the console when we interact with a component which has event(s) attached: backend.js:1 Uncaught (in promise) TypeError: Cannot read property 'name' of undefined

The second commit of this branch fixes this issue.

This issue appeared because the logEvent() function no longer receives a instanceId, it receives an instance as 3rd argument, so in src/backend/events.js:17 the following failed to identify a component: Livewire.components.componentsById[instanceId].

mpociot commented 3 years ago

Thank you!