QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.9k stars 1.31k forks source link

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

Open Varixo opened 2 days ago

Varixo commented 2 days ago

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

Varixo commented 1 day ago

probably same issue https://github.com/QwikDev/qwik/issues/3926