You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So can we also support shorthand props like svelte:
<img{src}/>
I know jsx can use {...{ src }} instead, but it's not beautiful for me.
I already created a plugin unplugin-jsx-short-bind to support it, because of TS, espree and babel don't support shorthand props, so I use ast-grep to parse ast.
Activity
KWangechi commentedon Apr 7, 2025
@zhiyuanzmj This is really awesome🙌, I'm also building sth similar but for Babel though. Is it possible to extend your plugin to React as well?
zhiyuanzmj commentedon Apr 7, 2025
Yes unplugin-jsx-short-bind is framework-agnostic.
zhiyuanzmj commentedon Apr 7, 2025
You can use ts-macro instead of @vue/language-tools to get type support.