Skip to content

Instantly share code, notes, and snippets.

/* global document */
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import shallowUtils from 'react-shallow-testutils';
it.browser = function(name, fn) {
if (typeof document !== 'undefined') {
it(name, fn);
}
@kpdecker
kpdecker / client-only.jsx
Created April 14, 2016 01:44
ClientOnly.jsx
/* eslint-disable react/prop-types, react/no-did-mount-set-state */
import React from 'react';
let initialRender = true;
export default class ClientOnly extends React.Component {
constructor(props) {
super(props);
this.state = {initialRender};
}

Keybase proof

I hereby claim:

  • I am kpdecker on github.
  • I am kpdecker (https://keybase.io/kpdecker) on keybase.
  • I have a public key ASCmQDlX2nLMCqt7JrZ2cjWLVamXlHyuR9OYXP9X1X4Z4go

To claim this, I am signing this object: