Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JSX Improvement #26

Open
Open
@Kagashino

Description

@Kagashino

When usingtext/jsx script implement a component by JSX syntax:

<script type="text/jsx">import { ref, h } from 'vue';export default function () {  const name = ref('Evan');  return (    <input value={name.value} onChange={(e) => { name.value = e.target.value; } } />  );}</script>

The "jsx-loader-like" loader was legacy for Vue3.x ,createElement function's parameter structure changed. (Seerfcs0008), The attributes on JSXElement should no longer be converted into the following data:

{  props: {    domProps: { value: "Evan" },    on: { change: ƒ onChange(e)}  }}

And the following data structure was expected to thecreateElement function parameter format:

{  props: {    onChange: ƒ onChange(e)    value: "bar"  }}

I know that JSX is still WIP, but I personally prefer this way of using setup (although this may lose the performance advantage brought by template compilation). If possible, hope to share related information about 'JSX loader/plugin (I'm not sure)' at the appropriate time

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp