nuxt / nuxt

The Intuitive Vue Framework.
https://nuxt.com
MIT License
54.06k stars 4.94k forks source link

Missing Support (Or documentation of) Options API with Nuxt #21670

Open snakysnake opened 1 year ago

snakysnake commented 1 year ago

Describe the feature

Hey I am currently moving a big project from standard vue3 to nuxt, and have to rewrite most of my options api code to composition api..

The issue mostly is that some features are not there in composition api and when one is missing i can't "link" it to options api and then i got to go down the rabbit hole of changing my code to use composition api although it's already completely valid options api code.

For real, props, it is an awesome framework and it's very impressive etc.

BUT.... in my opinion, it is kind of weird that it does not fully support vue (from my pov) as i do have to use so much "special" vue code instead of easily porting my app.

I am still continuing to use nuxt for now but if you were able to make the transition a bit easier, i think a lot of people would use nuxt instead of plain old vue 3.

I am willing to help with the adoption by saying what needs to happen (for a project like mine) to be easily portable to nuxt, if that is helpful.

Lmk what u think :)

Additional information

Final checks

danielroe commented 1 year ago

I would love a list of specific features supported in the Options API that would be helpful in your migration :+1:

snakysnake commented 1 year ago

To be honest, I am coming from a Noob POV (in Nuxt, the rest im okay), so it may be the case that what I am trying to do is actually easy to do with more knowledge. I think its probably mostly an issue with documentation, and misleading error messages for beginners, I am able to get through it but I will collect all potential improvement possibilities and going to answer with them on this issue.

Thank you so much for the quick response! And thanks a lot for this amazing framework! :))

snakysnake commented 1 year ago

First, what does the community think about multiple layers of layouts? The layouts architecture is different to vue default architecture but seems quite nice and understandable. It would be cool to have a nice structure for multiple layers of layouts, similar to the way that the router understands multiple layers.

It would make sense for consistency, I am now doing it another way but I think it would make sense.