Skip to content

Instantly share code, notes, and snippets.

View justinbmeyer's full-sized avatar

Justin Meyer justinbmeyer

View GitHub Profile
@andrejewski
andrejewski / can-defer.js
Last active March 14, 2018 20:27
Declaratively defer rendering for large components and lists (Can v2)
import Map from 'can/map/';
import Component from 'can/component/';
const viewModel = Map.extend('CanDeferVM', {
define: {
delayMs: {
value: 0,
set: x => parseInt(x, 10)
},