Skip to content

Instantly share code, notes, and snippets.

View taion's full-sized avatar
👹
Kappa

Jimmy Jia taion

👹
Kappa
View GitHub Profile
import invariant from 'invariant';
import React from 'react';
import BaseRoute from 'react-router/lib/Route';
import LoadingIndicator from './LoadingIndicator';
// This is not a component.
/* eslint-disable react/prop-types */
function render({ props, element }) {
if (!props) {
@taion
taion / Button.js
Last active July 31, 2016 09:10
Embarrassing strawman API proposal that hopefully gets the point across
// This is _not_ supposed to be a real API. It's only intended to describe what
// I'm looking for. It's almost intentionally awful.
export const buttonHook = new OverrideHook({
properties: ['margin'],
});
export default function Button(props) {
return (
<button
const Benchmark = require('benchmark');
const _ = require('lodash');
const props = {
className: 'foo',
onClick: () => null,
children: 'bar',
style: { top: 10 },
relay: {},
intl: {},
class Post {
static Resource = HttpResource;
static resourceConfig = { endpoint: '/posts' };
@field({ required: true }))
title = 'untitled';
@field()
text = '';