I have been using vue.js with quite long already. Vue 3 came out a few months ago, it introduced composition API and a few new changes. I have always been a fan of vue because it's quite simple to start with and its very very flexible. However, when building a page one thing we need to take care is SEO. Using plain vue and virtual DOM doesn't render our html code so scrapers cant get to know which webpage are they visiting nor what is the page about. This basically means google or other searchers will never put you on their page.
Confident enough to assure that I could face this problem i found Nuxt.js.
Before jumping directly into the Nuxt env, i will answer some questions.
What is Nuxt?
Nuxt is a framework built on top of Vue. It provices SSR which is the process where server sends data directly to the browser to draw layout. Browser doesn't need to call any api to fetch data from any source and manipulate the DOM. This just simple means that you now can use Vue and have html code rendered for any website the user visites. This is key for SEO.
Why Vue and not React?
This is just someone's opinion. I find vue easier to start with than react. However, from my point of view both provide what you need when developing a new website.
The steps I follow can be alterned between other ones. There are multiple cli scripts in orther to get a scaffold of your project
npm create nuxt-app <your-project-name>
This will create a new project as seen below:
In this case i used Vuesax as my primary ui dev env.
Getting through each folder:
Now that we have learned some basic Nuxt app setup, i will be explaining more in depth how route works in nuxt, how state management in store vuex and we will get started with a basic app.
Thanks for reading :)