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

Could we make the behavior of vue jsx further imitate template #735

Open
3 tasks done
s3xysteak opened this issue Jul 21, 2024 · 1 comment
Open
3 tasks done

Could we make the behavior of vue jsx further imitate template #735

s3xysteak opened this issue Jul 21, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@s3xysteak
Copy link

Clear and concise description of the problem

Jsx is a popular grammar, I know. But the difference of jsx between template is annoying. How about make vue jsx further imitate template? Like:

  1. Use directive in jsx, which has been achieved.
  2. Use "" instead of {}. Like <> <div v-if="!isHidden" /> <>
    ... And other stuff I haven't thought about it yet.

If the differences between jsx and template syntax can be eliminated, perhaps the problem of template reuse within SFC can be solved directly. I use h() instead of jsx because the difference between them is annoying. Make light code with h() is good but too long code with h() also brings negative experience.

Suggested solution

Could we use vue/compiler-sfc directly?

Alternative

No response

Additional context

No response

Validations

@s3xysteak s3xysteak added the enhancement New feature or request label Jul 21, 2024
@sxzz
Copy link
Member

sxzz commented Jul 21, 2024

Inspired by Vue Vine, we will also introduce similar template syntax in the future.

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

No branches or pull requests

2 participants