DEV Community

Discussion on: Taking Marko's Tags API for a Test Drive

Collapse
 
peerreynders profile image
peerreynders

Thank You for your response!

I've revisited

from 2020-Nov-23 as that seems to be the point where you got the most public feedback. Some questions:

<h1>${input.headerText}</h1>
<div/el />
<mount=() => {
  const chart = new window.Chart(el, input.data);
  return () => chart.release();
}/>
Enter fullscreen mode Exit fullscreen mode

Given that Chart uses a native DOM reference is it safe to assume that it is purely a client-side widget?

Consequently what actual HTML is sent from the server to the client? Something like:

<h1>Chart Header</h1>
<div></div>
Enter fullscreen mode Exit fullscreen mode

Side note: Good thing eBay doesn't plan on adopting Tailwind CSS.

Thread Thread
 
ryansolid profile image
Ryan Carniato

Yeah <mount> was an early version of our <lifecycle> tag. So this is all client side. So the server HTML would be what you wrote and when hydrated in the browser the chart would be created in this example. The refactor story equally applies to nested state, but nested side effects(browser only) I felt were the most obvious for this example.