You probably came here because your code is calling your component as a plain function call. This is now deprecated:
var MyComponent = require('MyComponent');
function render() {
return MyComponent({ foo: 'bar' }); // WARNING
// nb. This code is available in an ES module of Promise helpers, here: | |
// https://github.com/samthor/promises | |
// symbol returned to indicate that a call was cancelled | |
export const takeoverSymbol = Symbol('takeover'); | |
/** | |
* Accepts a generator function, which yields Promises, and converts it to an async function | |
* that cancels any previous calls. | |
*/ |
/** | |
* This function load font from web, stores it in localStorage and reuses on next page loads | |
* Different to everything I found on the internet due to following facts | |
* 1. Checks if the font is installed in the system and spend no time if it is | |
* 2. Loads actual WOFF or WOFF2 fonts (if supported) and not bit base64 encoded version - so it faster | |
* 3. Uses fetch API and FontFace API if available - it's cool! | |
* 4. Return promises and uses jQuery for cases where native promises probably not available | |
* | |
* @param fontName (Field for font-face) | |
* @param fontUrl (full URL but without .woff nor .woff2 extensions - format will be selected automatically) |
var DOMTokenListSupports = function(tokenList, token) { | |
if (!tokenList || !tokenList.supports) { | |
return; | |
} | |
try { | |
return tokenList.supports(token); | |
} catch (e) { | |
if (e instanceof TypeError) { | |
console.log("The DOMTokenList doesn't have a supported tokens list"); | |
} else { |
export class EnumSymbol { | |
sym = Symbol.for(name); | |
value: number; | |
description: string; | |
constructor(name: string, {value, description}) { | |
if(!Object.is(value, undefined)) this.value = value; | |
if(description) this.description = description; |
SELECT score, | |
subreddit, | |
link_id, | |
body, | |
author | |
FROM [fh-bigquery:reddit_comments.2007], | |
[fh-bigquery:reddit_comments.2008], | |
[fh-bigquery:reddit_comments.2009], | |
[fh-bigquery:reddit_comments.2010], | |
[fh-bigquery:reddit_comments.2011], |
#!/bin/bash | |
# CentOS rbenv system wide installation script | |
# Forked from https://gist.github.com/1237417 | |
# Installs rbenv system wide on CentOS 5/6, also allows single user installs. | |
# Install pre-requirements | |
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \ | |
make bzip2 autoconf automake libtool bison iconv-devel git-core |
export class EnumSymbol { | |
sym = Symbol.for(name); | |
value: number; | |
description: string; | |
constructor(name: string, {value, description}) { | |
if(!Object.is(value, undefined)) this.value = value; | |
if(description) this.description = description; |
/** @jsx React.DOM */ | |
var React = require("react"); | |
var Lightbox = React.createClass({ | |
render: function() { | |
return ( | |
<div> | |
<div className="lightbox-bg"></div> | |
<div className="lightbox"> | |
<div className="lightbox-wrap"> |
var cfg = require('../config').Config, | |
qs = require('querystring'), | |
request = require('request'); | |
request = request.defaults({jar: true}) | |
exports.awesome = function(req, res){ | |
headers = {}; |