webcomponents.dev icon indicating copy to clipboard operation
webcomponents.dev copied to clipboard

Consistency in the "All the ways..." code samples

Open oravecz opened this issue 4 years ago • 2 comments

I was noticing there are some inconsistencies with how code is written in some of the benchmark samples.

For example, in the React with Hooks sample, there is no formal intermediate function created for increment or decrement, but there is in the Svelte example.

// React
<button onClick={() => setCount(count - 1)}>-</button>

// Svelte
function inc() {
  count++;
}
<button on:click={inc}>

I don't think this will make a big difference when minimized and brotli compressed, but when doing a comparison that is supposed to be apples to apples, it would be good to follow similar coding practices.

oravecz avatar Jul 01 '21 16:07 oravecz

I like consistency otherwise it's unfair. @m4dz please, let's make a full review. I will help.

Thanks @oravecz

georges-gomes avatar Jul 01 '21 17:07 georges-gomes

I take it, thanks!

m4dz avatar Jul 01 '21 20:07 m4dz