QwikDev / qwik

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

Serializing two QRLs after render #464

Closed adamdbradley closed 2 years ago

adamdbradley commented 2 years ago

Qwik Version

0.0.20-1

Operating System (or Browser)

Any

Node Version (if applicable)

No response

Which component is affected?

Qwik Runtime

Expected Behaviour

export const App = component$(() => {
  const state = useStore({ count: 50 });
  return (
    <div>
      <div>Count: {state.count}</div>
      <button
        onClick$={() => {
          state.count++;
        }}
      >
        Click
      </button>
    </div>
  );
});

Rendered html

<button q:obj="1!" on:click="app_component_div_button_onclick_w75r9tqsgbi-127266e8.js#App_component_div_button_onClick_w75R9TQSgbI[0]
./app_component_div_button_onclick_w75r9tqsgbi-127266e8.js#App_component_div_button_onClick_w75R9TQSgbI[0]" q:seq="">Click</button>

Actual Behaviour

First click, increments by 1

Second click, increments by 2

Additional Information

No response

manucorporat commented 2 years ago

Fixed https://github.com/BuilderIO/qwik/commit/6615f036116005dc635fb794eb15fa4d036b561b