Skip to content

Instantly share code, notes, and snippets.

View edvinerikson's full-sized avatar

Edvin Eriksson edvinerikson

  • Pokeyo AB
  • Sweden
View GitHub Profile
const duplicateAccountCheckMachine = Machine({
id: "duplicateAccountCheck",
initial: "idle",
states: {
idle: {
on: {
OPEN: "started"
}
},
started: {
query FetchPlayerNotes {
# write query
}
import { query } from './RouteA';
const loadRoute = () => import('./RouteA');
// I want query to be duplicated in both chunks but I don't want the component exported as default to be included in this chunk.
// both are ES modules
// webpack currently merges these two into the same chunk.
<RelayRoute path="/route-a" query={query} component={loadRoute} />
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
const Authenticated = React.createClass({
propTypes: {
children: PropTypes.element.isRequired,
isAuthenticated: PropTypes.bool.isRequired,
history: PropTypes.object.isRequired,
},
componentDidMount() {