4281 shaares
2 results
tagged
lazyRender
PRPL is a pattern for structuring and serving Progressive Web Apps (PWAs), with an emphasis on the performance of app delivery and launch. It stands for:
- Push critical resources for the initial URL route.
- Render initial route.
- Pre-cache remaining routes.
- Lazy-load and create remaining routes on demand.
function lazyRender(el, html) {
let cloneEl = el.cloneNode();
cloneEl.innerHTML = html;
window.requestAnimationFrame(function(){
morphdom(el, cloneEl);
});
};