Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Vue SFC for better type/optimization #556

Open
inokawa opened this issue Nov 21, 2024 · 1 comment
Open

Migrate to Vue SFC for better type/optimization #556

inokawa opened this issue Nov 21, 2024 · 1 comment

Comments

@inokawa
Copy link
Owner

inokawa commented Nov 21, 2024

Is your feature request related to a problem? Please describe.
Vue's official support for defineComponent and JSX is limited. It's almost impossible to type slot with generics using defineComponent. Also defineComponent and JSX are less optimized than SFC, and probably can't be compiled with Vapor mode.

Describe the solution you'd like
Replace Vue's defineComponent with script setup using SFC, or maybe setupSFC or setupComponent of vue-macros.

Describe alternatives you've considered
Continue to use defineComponent and JSX, and improve type/optimization in some way.

Additional context
#342
#347

@tobychidi
Copy link

tobychidi commented Nov 22, 2024

I believe the shift to SFC is the best solution. SFCs are also easy to write. to just add setup and lang=ts

I have a problem with the types in the current version (slots) like you mentioned.

I also have another problem where the list does update when the data changes. I connected the list to the data return by a Pinia Colada Query. The updates work for regular v-for but not for VList. I had to use :key but now, I am not able to animate the items.

SFC (composition API) would also make it easier for me to read and contribute to the code base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants