Skip to content

Instantly share code, notes, and snippets.

@nfcampos
Created March 8, 2016 23:16
Show Gist options
  • Save nfcampos/705c828775c635db8aeb to your computer and use it in GitHub Desktop.
Save nfcampos/705c828775c635db8aeb to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<!-- put additional styles and scripts here -->
</head>
<body>
<!-- put markup and other contents here -->
</body>
</html>
const realConstructor = React.Component.prototype.constructor
React.Component.prototype.constructor = function(...args) {
realConstructor(...args)
return new Proxy(this, boom)
}
const boom = {
get: function(target, name) {
if (newVersionOfPropertyIsAvailable)
return newVersionOfProperty
else
return target[name]
}
}
{
"name": "esnextbin-sketch",
"version": "0.0.0"
}
"use strict";
var realConstructor = React.Component.prototype.constructor;
React.Component.prototype.constructor = function () {
realConstructor.apply(undefined, arguments);
return new Proxy(this, boom);
};
var boom = {
get: function get(target, name) {
if (newVersionOfPropertyIsAvailable) return newVersionOfProperty;else return target[name];
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment