Skip to content

[🐞] v2 - the optimizer does not change props to a single variable #7122

@Varixo

Description

@Varixo

Which component is affected?

Qwik optimizer (rust)

Describe the bug

if prop is an aliased string, the optimizer does not change props to a single variable
Doesn't work:

    const Input = component$(
      ({ 'test': abcd}) => {
        return <div></div>;
      }
    );

Works:

    const Input = component$(
      ({ test: abcd}) => {
        return <div></div>;
      }
    );

Reproduction

https://qwik.dev/playground/#f=Q040lhYkJxqI7yDVrS1ymgFaoFGtoF4CLHTVrRQSk5JTauF%2BR6QjUJMC0rCwBorXcgHdREo6hIYexHq4pzStRxPi0EuIAA

Steps to reproduce

No response

System Info

v2

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions