Hacker News new | ask | show | jobs
by akx 3277 days ago
The array example is a little weird.

    // no events here
    arr.map(v => v + '-meh')
Since `.map` doesn't mutate the array in the first place, surely no one would expect observation events to occur anyway?
2 comments

now array methods dispatch as well in v1.1.0 I also thought it was weird thanks for your feedback anyway
Indeed. This functionality really worries me.

Why would a non-mutation trigger listeners?

you are absolutely right, map doesn't belong to the mutational methods. Fixed in v1.1.1 thank you for your feedback