Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

liamseys's avatar

Scripts with wire:navigate (data-callback)

https://gist.github.com/liamseys/33b0b3f1e3774b7e9773e899d61c6e88

This script works fine on the first page load, but when I navigate to another page using wire, I get an error saying that Mapkit is already initialized. I tried placing the script inside livewire:nagivated, but that doesn’t work because the script needs to wait for Mapkit to initialize, which is done via the script tag when loading Mapkit.

0 likes
0 replies

Please or to participate in this conversation.