You will get one of these:
Uncaught (in promise) TypeError: Cannot read property 'toUpperCase' of undefined(…)
ReactCompositeComponent.js:870 Uncaught TypeError: Cannot read property 'displayName' of undefined
if you try to:
Moved to https://github.com/ebidel/puppeteer-examples |
Note: if you want to skip history behind this, and just looking for final result see: rx-react-container
When I just started using RxJS with React, I was subscribing to observables in componentDidMount
and disposing subscriptions at componentWillUnmount
.
But, soon I realised that it is not fun to do all that subscriptions(that are just updating property in component state) manually, and written mixin for this...
Later I have rewritten it as "high order component" and added possibility to pass also obsarvers that will receive events from component.
var spawn = require('child_process').spawn; | |
gulp.task('npm', function (done) { | |
spawn('npm', ['publish'], { stdio: 'inherit' }).on('close', done); | |
}); |
// HTTP forward proxy server that can also proxy HTTPS requests | |
// using the CONNECT method | |
// requires https://github.com/nodejitsu/node-http-proxy | |
var httpProxy = require('http-proxy'), | |
url = require('url'), | |
net = require('net'), | |
http = require('http'); |
function escapeHTML(s,r){r='replace';return s[r](/&/g,'&')[r](/>/g,'>')[r](/</g,'<')} |
<?xml version="1.0" encoding="utf-8"?> | |
<project name="sample-require-js" default="" basedir="."> | |
<!-- properties --> | |
<property name="r.js" value="_build/rjs/r.js" /> | |
<property name="closure.jar" value="_build/closure/compiler.jar" /> | |
<property name="rhino.jar" value="_build/rhino/js.jar" /> | |
<property name="js.build" value="_build/js.build.js" /> | |
<property name="css.build" value="_build/css.build.js" /> |
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, io = require('socket.io'); | |
var app = module.exports = express.createServer(); | |
// Configuration |