by lmiller1990 · 3y ago · 0 comments
Re global enums - I'm not sure what the author means about global enums - anything imported into your Vue file can be used in the `<template>`.
Re styles - Style is automatically scoped in Vue SFC files, too - I believe it was the first component framework to do this.
This article and migration seems not very thoroughly researched - seems the author just wants a reason to rewrite the front-end.
<style> is global, <style scoped> is scoped. But comparing frameworks based on having to write at most one extra scoped property in each file, or having to wrap HTML template in a <template> is laughable. You get a hundred times the time back the first time you need a library not available in the smaller ecosystem.
-----
I agree with the rest, but how do you use imported TS enums in your template? Something like this being impossible is regularly a pain point for me:
slotProps.data.type === ArticleTypes.SomeTypeOtherwise you also need to return it in the setup function (composition) or store a local copy of it in the data field (options)