This file contains hidden or 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
const processData = someExpensiveFunction; | |
const mapStateToProps = state => ({ | |
foos: getFoos(state), | |
}); | |
const MyComponent = props => ( | |
<div>baz: {props.baz}</div> | |
<SubComponent data={processData(props.foos)} /> | |
); |
This file contains hidden or 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 { compose } from 'lodash/fp'; | |
import React from 'react'; | |
import { reduxForm, destroy } from 'redux-form'; | |
import { connect } from 'react-redux'; | |
import { withStyles } from 'material-ui/styles'; | |
import ExpTextField from 'common/components/form/ExpTextField'; | |
const styles = { | |
root: { |
This file contains hidden or 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
// the error that happens when running the server: | |
> node server.js | |
/Users/tristanpendergrass/dev/project/server/models/trade.model.js:2 | |
this.ign = data.ign; | |
^ | |
// trade.model.js |
This file contains hidden or 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
{"name":"EXP API","hostname":"T.local","pid":42588,"level":30,"req":{"method":"GET","url":"/api/content?limit=25&parent=root&skip=0&sort=name","headers":{"host":"localhost:9000","connection":"keep-alive","pragma":"no-cache","cache-control":"no-cache","accept":"application/json, text/plain, */*","origin":"http://localhost:8000","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36","authorization":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcGkiOnsiaG9zdCI6Imh0dHA6Ly9sb2NhbGhvc3Q6OTAwMCJ9LCJuZXR3b3JrIjp7Imhvc3QiOiJodHRwOi8vbG9jYWxob3N0OjkwMDIifSwiaWRlbnRpdHkiOnsidHlwZSI6InVzZXIiLCJvcmdhbml6YXRpb24iOiJqYW4xMWRlbW8iLCJ1c2VybmFtZSI6InRwQHQuY29tIiwicm9sZSI6Im93bmVyIiwiY29ubmVjdGlvbklkIjoiZmMzOTk5NmUtODQwMy00YjlmLTlkZmYtZmE4NmEzOWUxNDgzIiwibm9uY2UiOjE0OH0sImlhdCI6MTQ4NDc1MjE0MywiZXhwIjoxNDg0NzcwMTQzfQ.ksJjCSoTfO8oR-rykiZPU6gKo66NDw3ZB1xrUDbx1k8","referer":"http://localhost:8000/content?filter=&order=name&limit=25&page=1&uuid=root" |
This file contains hidden or 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
// contentGrid.directive.js | |
import angular from 'angular'; | |
import gridTpl from './contentGrid.tpl.html'; | |
import angularServices from 'common/services/angular/index'; | |
import coreServices from 'common/services/core/index'; | |
import 'common/vaadinGrid.css!'; | |
function contentGrid() { |
This file contains hidden or 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
snippet watch | |
$1.$watch(() => $1.$0, () => { | |
console.log('$1.$0 is', $1.$0); | |
}); | |
endsnippet |
This file contains hidden or 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
~/scala/exp-core $ grep -R "ContentFile" ./client/src/ | |
./client/src//app/content/content.controller.js: constructor($scope, $log, $mdBottomSheet, $mdDialog, $filter, $interval, $rootScope, ContentFolder, ContentFile, ContentApp, ContentUrl, Content, Color, ScalaToast, ExperienceTemplate, FileType, Upload, Auth, ExpMenubarTitle) { | |
./client/src//app/content/content.controller.js: this.ContentFile = ContentFile; | |
./client/src//app/content/content.controller.js: serviceToCall = this.ContentFile; | |
./client/src//app/content/content.controller.js: serviceToCall = this.ContentFile; | |
./client/src//app/content/content.controller.spec.js: let ContentFile; | |
./client/src//app/content/content.controller.spec.js: ContentFile = {}; | |
./client/src//app/content/content.controller.spec.js: ContentCtrl = $controller('ContentCtrl', { $scope, $state, $mdBottomSheet, $mdDialog, Config, ContentFolder, ContentFile, ContentApp, ContentUrl, Content, FileType, Upload, Auth, ExpMenubarTitle }); | |
./client/src//app/content/co |
This file contains hidden or 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
constructor ($scope, angularServices, coreServices) { | |
this.$scope = $scope; | |
Object.assign(this, angularServices._.pick(angularServices, [ | |
'$http', | |
'$timeout', | |
'$location', | |
'$state' | |
])); |
This file contains hidden or 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
constructor ($scope, angularServices, coreServices) { | |
this.$scope = $scope; | |
const { $http, $timeout, $location, $state } = angularServices; | |
const { config } = coreServices; | |
this.$http = $http; | |
this.$timeout = $timeout; | |
this.$location = $location; | |
this.$state = $state; |
This file contains hidden or 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
class ContentCtrl { | |
constructor($scope, contentItems) { | |
this.readyIntervals = []; // $interval for each content item that we're checking "ready" status of | |
$scope.$on('$destroy', () => { | |
this.readyIntervals.forEach($interval.cancel.bind($interval)); | |
}); | |
this.contentItems = contentItems; | |
this.contentItems.forEach(this.getReadyStatus.bind(this)); |