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
# Change YOUR_TOKEN to your prerender token | |
# Change example.com (server_name) to your website url | |
# Change /path/to/your/root to the correct value | |
server { | |
listen 80; | |
server_name example.com; | |
root /path/to/your/root; | |
index index.html; |
var cfg = require('../config').Config, | |
qs = require('querystring'), | |
request = require('request'); | |
request = request.defaults({jar: true}) | |
exports.awesome = function(req, res){ | |
headers = {}; |
/** @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"> |
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; |
#!/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 |
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], |
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; |
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 { |
/** | |
* 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) |