lite-html icon indicating copy to clipboard operation
lite-html copied to clipboard

Refactor previousValue tracking in NodePart

Open ruphin opened this issue 7 years ago • 0 comments

Currently previousValue is used in the individual _render helpers, but set globally in the render function. It doesn't work as intended for _renderPrimitive, and there are some other issues. It would also be nice if render itself could exit early if it detects no value change.

Probably the way to go is checking for TemplateResult and Iterable first, then having a single guard for value === previousValue for the other render types. The main complexity is figuring out a correct solution for _renderPromise.

ruphin avatar Aug 05 '18 21:08 ruphin