Open selfup opened 6 years ago
So it seems that using a helper method for dispatching has revealed some sort of bug 🐛
`<div> <p>${state.num}</p> <button onclick=${dispatch('up')}>+</button> <button onclick=${dispatch('down')}>-</button> </div>`
This works fine!
But 😢
`<div> ${state.num} <button onclick=${dispatch('up')}>+</button> <button onclick=${dispatch('down')}>-</button> </div>`;
This is broken. It seems that the way the DOM is constructed matters here? 🤔
Another neat bug is here:
`<div> ${state.num} <button onclick=${dispatch('up')}>+</button> </div>`;
😭
Now nothing fires! So there must be a level required of DOM nodes it seems
Here is the codepen for reproduction of said bugs: https://codepen.io/selfup/pen/jZjopM?editors=0010
Working on it! Thank you for the report.
So it seems that using a helper method for dispatching has revealed some sort of bug 🐛
This works fine!
But 😢
This is broken. It seems that the way the DOM is constructed matters here? 🤔
Another neat bug is here:
😭
Now nothing fires! So there must be a level required of DOM nodes it seems
Here is the codepen for reproduction of said bugs: https://codepen.io/selfup/pen/jZjopM?editors=0010