Skip to content

Instantly share code, notes, and snippets.

👹
Kappa

Jimmy Jia taion

👹
Kappa
Block or report user

Report or block taion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@taion
taion / async-props-style.js
Last active Jan 24, 2017
React Router data fetching
View async-props-style.js
// Define your components like:
class MyComponent extends React.Component {
static fetchData = (params) => {
// return an action here.
};
/* ... */
}
function fetchComponentData(component, store, params) {
@taion
taion / registry.js
Last active May 7, 2019
Relay type registry
View registry.js
import decamelize from 'decamelize';
import { fromGlobalId } from 'graphql-relay';
import pluralize from 'pluralize';
import getItem from '../api/getItem';
const types = {};
const endpoints = {};
const getItemOverrides = {};
You can’t perform that action at this time.