Skip to content

Instantly share code, notes, and snippets.

View re-use.js
const monthsToRenderTempalte = [
{
key: 'month-slot-1',
state: {},
},
{
key: 'month-slot-2',
state: {},
},
{
View bindFactory.js
const bindFactory = injectable => (...binds) => injectable(Object.assign({}, ...(binds || [{}])));
const service = args => ({myArgs: () => args});
const bindableService = bindFactory(service);
console.log(bindableService().myArgs());
const withSomeArgs = bindableService.bind(null, {a: 'apple;'});
console.log(withSomeArgs().myArgs());
You can’t perform that action at this time.