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.
Currently
previousValueis used in the individual_renderhelpers, but set globally in therenderfunction. It doesn't work as intended for_renderPrimitive, and there are some other issues. It would also be nice ifrenderitself 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 === previousValuefor the other render types. The main complexity is figuring out a correct solution for_renderPromise.