antonmedv / monkberry

Monkberry is a JavaScript library for building web user interfaces
https://monkberry.js.org
MIT License
1.49k stars 78 forks source link

What magic is under the hood instead of virtual-dom? #19

Open davojan opened 8 years ago

davojan commented 8 years ago

How the engine detects what DOM should be changed on update without virtual-dom?

Mevrael commented 7 years ago

Why do you need Virtual DOM?

antonmedv commented 7 years ago

Hi,

I'm going to write an article about how Monkberry works in next month. Will explain all there. Short answer is what templates compiled from this:

<div>
  ...
    <h1>{{ title }}</h1>
  ...
</div>

To something like this:

function (state) {
  h1.textContent = state.title;
}

And some king of "virtual dom" used on top/component level.

fliptheweb commented 7 years ago

@elfet did you complete your article? Wanna read :)

antonmedv commented 7 years ago

@fliptheweb i'm always gonna to, but can not find time now :(

lijinpengFj commented 7 years ago

@antonmedv did you finish the article? I'm really want to know the keys of monkberry.

antonmedv commented 7 years ago

@lijinpeng7364 nope, sorry. A lot of work)

lijinpengFj commented 7 years ago

@antonmedv ok, hope someday you can finish it.