View with_meteor_data.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createContainer } from 'meteor/react-meteor-data' | |
import { curryN } from 'lodash/fp' | |
export default curryN(2)(createContainer) |
View pomisify_meteor_apis.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Meteor } from 'meteor/meteor' | |
import { Accounts } from 'meteor/accounts-base' | |
import { assoc, keys, isFunction, reduce } from 'lodash/fp' | |
export default function () { | |
promisifyObject(Meteor) | |
promisifyObject(Accounts) | |
} | |
function promisifyObject (target) { |
View define_component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { setDisplayName, setPropTypes, pure, compose } from 'recompose' | |
export default function (displayName, propTypes = {}) { | |
return compose( | |
setDisplayName(displayName), | |
setPropTypes(propTypes), | |
pure | |
) | |
} |
View with_dynamic_module.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { defaults } from 'lodash/fp' | |
/** | |
* load a dynamic module | |
* | |
* e.g. | |
* | |
* case: load a single module | |
* withDynamicModule('SomeComponent', () => import('some-component').then(mod => mod.default)) |