Added Vue 3 Composition API [1 of 2] #13
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces the use of the script setup syntax in our Vue 3 application, specifically within the App.vue file. The changes made in the past 4 commits are as follows:
Commit 1: Initialized the use of script setup in App.vue. This new syntax allows us to write our Composition API code without needing to define a setup() function, making our component code more concise.
Commit 2: Refactored existing reactive data properties to use the ref() function from Vue 3. This change was necessary to comply with the Composition API's way of handling reactivity.
Commit 3: Moved computed properties and methods into the script setup block. This change further aligns our code with the Composition API style and takes advantage of Vue 3's improved reactivity system.
Commit 4: Finalized the transition to script setup by ensuring all component options (such as props, components, etc.) are correctly defined and accessible within the script setup context.
These changes collectively improve the readability and maintainability of our Vue.js codebase by fully utilizing the advantages of Vue 3's Composition API.
Signed-off-by: GitHub Copilot