max-mapper / yo-yo

A tiny library for building modular UI components using DOM diffing and ES6 tagged template literals
1.33k stars 65 forks source link

PSA: morphdom v2 released #41

Closed patrick-steele-idem closed 7 years ago

patrick-steele-idem commented 8 years ago

FYI, I just published morphdom@2 with some improvements:



See: morphdom/CHANGELOG

When you have a chance to upgrade please let me know if you see any issues.

Cheers.

shama commented 8 years ago

Thanks @patrick-steele-idem!

timwis commented 8 years ago

That's exciting news @patrick-steele-idem!

FYI, I tried out upgrading morphdom in yo-yo locally and it appears to have broken the following tests:

patrick-steele-idem commented 8 years ago

@timwis thanks for taking a look. The breaking test looks to be due to the following breaking change in morphdom:

Fortunately, it should be a simple change to the following line:

https://github.com/maxogden/yo-yo/blob/656992c1553782c779c9de4c711614b16c7f342a/index.js#L11

Something like the following should work:

if (opts.onBeforeMorphEl) { // If you need to support the old `onBeforeMorphEl`
  opts.onBeforeElUpdated = opts.onBeforeMorphEl
}
if (!opts.onBeforeElUpdated) opts.onBeforeElUpdated = copier
kristoferjoseph commented 7 years ago

We should close this issue now that #51 has landed 😸

shama commented 7 years ago

Thanks @kristoferjoseph!