Skip to content

Attributes gets converted to camelCase without explicit props declaration #583

@sqal

Description

@sqal

Version

3.0.0-alpha.1

Reproduction link

https://codesandbox.io/s/zen-field-ewni3

vue 2 for comparison - https://jsfiddle.net/jfrhgbma/

Steps to reproduce

import { h, createApp } from "vue";

function Button(props, { attrs }) {
  console.log({
    props,
    attrs
  });
}

const App = {
  setup() {
    return () => [
      h(Button, {
        "data-id": 1,
        "aria-label": "Close",
      })
    ];
  }
};

createApp().mount(App, "#root");

What is expected?

Button's props should be in camelCase and attrs in kebab-case

What is actually happening?

Without explicit props declaration Button attrs keys are converted to camelCase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions