#Comprehensive Introduction to @ngrx/store By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
import React, { Component } from 'react'; | |
export default function withPropsChecker(WrappedComponent) { | |
return class PropsChecker extends Component { | |
componentWillReceiveProps(nextProps) { | |
Object.keys(nextProps) | |
.filter(key => { | |
return nextProps[key] !== this.props[key]; | |
}) | |
.map(key => { |
{ | |
"name": "pushertableinrealtime", | |
"version": "1.0.0", | |
"description": "\"\"", | |
"main": "app.js", | |
"scripts": { | |
"test": "\"echo \\\"Error: no test specified\\\" && exit\" " | |
}, | |
"repository": { | |
"type": "git", |
var express = require('express'); | |
var path = require('path'); | |
var favicon = require('serve-favicon'); | |
var logger = require('morgan'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var Pusher = require('pusher'); | |
var pusher = new Pusher({ |
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |
for app in $(heroku apps); do heroku apps:destroy --app $app --confirm $app; done |
#Comprehensive Introduction to @ngrx/store By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
I had a large client framework extending my personal boilerplate that was taking upwards of 10seconds to compile with standard Ruby Sass. This framework had minimal dependencies:
I used Bundler to manage Ruby dependencies and ran tasks with Grunt — mainly compiling Sass via grunt-contrib-compass, and previewing with live-reload. Simple stuff.
But 10seconds was an unacceptable performance hit for me. I typically keep my monitor split in half (using Spectacle ), with a browser on one half and MacVim on the other. With Live Reload running I get a nearly realtime preview of my work … except for that one client framework, where I was gettin
console.clear(); | |
/*! | |
* Pub/Sub implementation | |
* http://addyosmani.com/ | |
* Licensed under the GPL | |
*/ | |
var pubsubz = {}; | |
(function (q) { |
console.clear(); | |
var mediator = (function(){ | |
// Storage for our topics/events | |
var channels = {}; | |
// Subscribe to an event, supply a callback to be executed | |
// when that event is broadcast | |
var subscribe = function(channel, fn){ | |
if (!channels[channel]) channels[channel] = []; |