Open cindrmon opened 2 years ago
can you open pull request or link to fork? I need to upgrade to composition api too, happy to double check your code.
can you open pull request or link to fork? I need to upgrade to composition api too, happy to double check your code.
sure! i might be working on recreating this one after finals week, since im currently on crunch time with my schoolworks, but I'll definitely linke the code here once i've made it working properly
can you open pull request or link to fork? I need to upgrade to composition api too, happy to double check your code.
sure! i might be working on recreating this one after finals week, since im currently on crunch time with my schoolworks, but I'll definitely linke the code here once i've made it working properly
Looking forward for your fork :)
Count me in please for the boilerplate :)
That would be fantastic, I am in :) As @rumbis said it's great for boilerplate. It's hard to find nice clean "how should be done" simple project to learn from.
🔖 Feature description
Basically, it is just an update to the current vue todo list demo to feature the new features for vite and vue 3, including, but not limited to, composition api, pinia, and script setup.
🎤 Pitch
Currently, it is seen that the demo project has already used vite under the hood, so why not use some of the new features it had already brought?
These new features include the new composition api, and the equally new
<script setup>
syntax sugar, which simplifies how we write our script tags in vue, eliminating a lot of boilerplate code and making it feel like a more natural javascript experience.here's an example from the project's Login.vue component (still working on it though, this code is just for demonstration purposes.):
before
after
This also demonstrated how pinia also simplifies how you access the state just by writing two lines of code:
you would have immediate access to that store just by doing that! any method or reactive value set in the account store can now be accessed just by typing
account.
. Its that simple!Wow!
Another is the newer state management system, pinia. It also freshens up the experience in using a state management system, as it does not require modules and a main
index.js
file to handle multiple state managements. Modules can now be in their own file, called stores, and does not need to be imported into a singleindex.js
file like what it used to be with vuex. Also, pinia can be imported easily through any components with ease.your folder structure would be a noticeable difference when using pinia over vuex, look at the difference:
before
after
**No need for an index.js file anymore inside the
src/store
folder!You can even use the composition API in pinia, so that you can have that same boilerplate-less code for your state management system as well as your components!
here's an example comparison between the two. I used the
account.js
as a reference from the project (still working on it though, this code is just for demonstration purposes)before
after
so as you can see, it used less boilerplate code, and you write your methods without actions or even mutations! as if you were writing composition api from a vue component.
besides all of that, this is just a suggestion. i'm currently trying out appwrite, and im currently trying out on how to incorporate what i have learned from the new composition api, pinia, and script setup, to see how all of these works together, and i would love to see it with the new features vue 3 and vite had brought to us.
im also curious on what other people think about updating or adding another demo project that uses pinia and composition api. and i hope you would also like to try appwrite with these new features!
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?