How to use layers in Nuxt 4

preview_player
Показать описание
Nuxt 4 is almost out and in this video we take a look at how to use layers in the upcoming Nuxt 4.
Рекомендации по теме
Комментарии
Автор

Thank you so much, been digging with modular architecture in nuxt for a long time and things were getting complicated, but your 5 minute video totally helped me, Subscribe and like from me bro, keep releasing videos!

AbdulMalikAgzamov
Автор

Nice, keep them going more Nuxt content the better!

MrSonicastra
Автор

thanks for the tutorial! I'd like to see how we can use layers to create something like a white label app with most of the functionality and then branded apps that are 99% the same but each one has its own environment. For instance, some kind of shop app with all the functionality to sell products but then one brand sells only shoes and they have different styling while the other sells pants and also has different styling and colors, while the core functionality between both apps remains the same

nosmirck
Автор

Please make one more video to explain how this can be useful on a architecture, where multiple projects (deployed on multiple domains) can share a components "layer" with each other.
This is a *really* useful feature which other ecosystems dont have to my knowledge and it will surely benefit a lot of people and make Nuxt even more attractive.
I subscribed for it, would be amazing

creative.money_eu
Автор

Oh makes sense with the new folder structure. I was trying to create a new project and when I did enable the compatibility version my app broke because didn't have the app folder.
Thank you.

Joan-krjo
Автор

Sounds like a very useful feature, that you can have different config files for each layer. Although I have to think about a little bit when in real life I would use that – e.g. one layer uses Pinia, one Vuex? Or one Bootstrap, but another Tailwind? 😊 But in general I like the idea 🙂👍

viesturs.knopkens
Автор

I thought layers in Nuxt meant a different thing. Layers allows you to share components with other installations, we are not talking about the same thing. Correct?

nyambe
Автор

Not released yet, and won't be during this year 99% :D

alexanderkim
Автор

This is all really interesting.. how could we have a base collection of these global files and then have these layers override those global components? Does one layer's components override a layer higher up in the tree? If we can achieve this with layers then this is really exciting

michaelpeters
Автор

is it ok to have layers outside the "my-app" folder? Imagine I have 2 apps: app1 and app2. Both share some common functionality. Can I have a structure like /layers/, /app1/, /app2/ ? And do I need pnpm to make this work or any package manager would do it? Thanks.

overnightmares
Автор

this awfully reminds me of django and the apps concept

ayushmanbt
Автор

just pointless meanderings in the javascript land. they keep changing things for no reason. instead they should selectively ignore things not being changed such as node modules... i dont know why javascript devs lap it up...

nonefvnfvnjnjnjevjenjvonej