Persistent layouts doesn't work in Vue 3
See original GitHub issueVersions:
@inertiajs/inertia
version: 0.8.5@inertiajs/inertia-vue3
version: 0.3.5
Describe the problem:
Using persistent layouts gives the following error:
Error: Codegen node is missing for element/if/for node. Apply appropriate transforms first.
Steps to reproduce:
Switch from the layout component used in template to layout defined in component object.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to use Persistent Layouts with Inertia and Vue 3 Setup ...
Here's a quick way you can support persistent layouts with Vue 3's `setup` script syntax.
Read more >vuejs3 - How can I reload a persistent layout or watch props ...
I have a Laravel project with InertiaJs and Vue3. I have a navigation as a persistent layout which works as expected.
Read more >Pages - Inertia.js
Persistent layouts While it's simple to implement layouts as children of the page components, it does force the layout instance to be...
Read more >Persistent Layout in Breeze/Vue - Laracasts
I'm using Laravel Breeze/Vue and I'm confused about something. In episode 12 (Persistent Layouts) of 'Building Modern Laravel Apps using Inertia.js', ...
Read more >Vue tricks: smart layouts for VueJS | by Manu Ustenko - ITNEXT
First of all, remove HelloWorld.vue component and components folder. In this project it won't be needed. In Home.vue we should remove import to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Wait, I see the issue here. You’re using named slots. See #171.
If you need named slots, you’ll need to use regular layouts, not persistent layouts. Feel free to join in the discussion in the existing issue.
Closing this, as it’s a duplicate.
@buismaarten This appears to be the working code (it’s not using persistent layouts). Can you share the code that doesn’t work?