cferdinandi / reef

A lightweight library for creating reactive, state-based components and UI.

Home Page:https://reefjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use domdiff?

naasking opened this issue · comments

Not an issue per se, I'm just curious whether you've evaluated the use of the domdiff library. All benchmarks I've seen show it's barely slower than vanilla JS, which is impressive.

I had an idea to implement something like Reef based on domdiff until I came across your project.

Is there a compelling reason to remove the existing diffing library in favor of domdiff()?

You're obviously in the best position to evaluate its suitability, I'm just bringing it to your attention since I didn't see it mentioned in any prior discussions. Off the top of my head:

  1. Performance, as I mentioned. I haven't seen benchmarks of Reef, but domdiff is actually competitive with vanilla JS. Tough to beat that.
  2. Complete and robust. It's well tested and proven being the core of hyperHTML.

I'll leave it there, up to you to decide whether it fits your purposes.

domdiff has a lot of differences between how Reef's diff() method works, most notably that it doesn't support nested nodes. That essentially makes it a non-starter for this project.