How do you have declared the layouts for each component ? Can you show an example please ?
Jul 30, 2023
26
Level 5
Livewire 3 - wire:navigate / navigate between to components that have different layout
When I navigate between two components using the new Navigate redirection and the two components have livewireStyles and livewrieScripts, when I return from a page that already loads the scripts and styles to a page that will load the scripts and styles I got a Warning
livewire.js?id=777821c0:8776 Detected multiple instances of Livewire running
livewire.js?id=777821c0:8778 Detected multiple instances of Alpine running
and when I do i any functionality that related to Livwire I got
TypeError: Alpine.navigate is not a function
my thoughts this is related to conflict of alpine loaded two times What i can do to prevent this?
Level 63
@MohammedAssafly Yes you can also use the component syntax.
Base layout
<!doctype html>
<html>
<head>
</head>
<body>
{{ $slot }}
</body>
</html>
Auth layout
<x-layouts.base>
// another structure for members
<header>
</header>
<div>
<main>
<aside>
// menu for members
</aside>
{{ $slot }}
</main>
</div>
<footer>
</footer>
</x-layouts.base>
Auth content
<x-layouts.auth>
Hey I'm logged in !
</x-layouts.auth>
Please or to participate in this conversation.