Are there any examples that show using queries/mutations outside the scope of the setup method? #42
-
I'm assuming this has to be possible or maybe I'm not understanding the component API well enough. I'm looking to see how you would implement a master details CRUD type page, something like a todo list app. Where you can create new ones, update existing, etc... I'm not sure I understand how you would accomplish that if everything has to be in the setup methods. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @RyanAtViceSoftware. That being said, you can combine composition API with old-style components but it's not advisable. As for the examples and more documentation, it's in progress. |
Beta Was this translation helpful? Give feedback.
Hi @RyanAtViceSoftware.
This library aims to provide hooks for the Vue composition API. You can replace all of the old class pieces that were used previously with the composition API easily.
You can take a look at https://v3.vuejs.org/guide/composition-api-introduction.html#why-composition-api to get the crash course on the composition API and how to use it.
That being said, you can combine composition API with old-style components but it's not advisable.
If you want to use this library you have to use hooks inside the
setup
function.As for the examples and more documentation, it's in progress.