This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import gql from 'fraql' | |
const ArticleCard = ({ article }) => ( | |
<div> | |
<h1>{article.title}</h1> | |
<p>{article.description}</p> | |
</div> | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable react/no-multi-comp, react/no-unused-state */ | |
import React from 'react' | |
import { connect } from 'react-redux' | |
import * as ReactAdmin from 'react-admin' | |
import { createSelector } from 'reselect' | |
import { Field, arrayRemove, arrayPush } from 'redux-form' | |
import { CircularProgress } from 'material-ui/Progress' | |
import Table, { | |
TableBody, | |
TableCell, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ "presets": ["env", "react"] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import gql from 'graphql-tag' | |
import { graphql } from 'react-apollo' | |
const QUERY = gql` | |
query character { | |
character(id: 1) { | |
name | |
films { | |
id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node { | |
leftNodes = [] | |
rightNodes = [] | |
area = null | |
level = 0 | |
constructor({ data = {}, context = {}, computeData = node => node.data }) { | |
this.data = data | |
this.context = context | |
this.computeData = computeData |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import { BrowserRouter, Route } from 'react-router-dom' | |
import loadable, { loadComponents } from 'loadable-components' | |
const Home = loadable(() => import('./Home')) | |
const About = loadable(() => import('./About')) | |
const Topics = loadable(() => import('./Topics')) | |
const App = () => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { renderToString } from 'react-dom/server' | |
import { StaticRouter } from 'react-router' | |
import { getLoadableState } from 'loadable-components/server' | |
import App from './App' | |
const app = ( | |
<StaticRouter> | |
<App /> | |
</StaticRouter> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { renderToString } from 'react-dom/server' | |
import { StaticRouter } from 'react-router' | |
import { getLoadableState } from 'loadable-components/server' | |
import App from './App' | |
const app = ( | |
<StaticRouter> | |
<App /> | |
</StaticRouter> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import { BrowserRouter, Route } from 'react-router-dom' | |
import loadable from 'loadable-components' | |
const Home = loadable(() => import('./Home')) | |
const About = loadable(() => import('./About')) | |
const Topics = loadable(() => import('./Topics')) | |
const App = () => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
class Home extends React.Component { | |
state = { Component: null } | |
componentWillMount() { | |
import('./Home').then(Component => { | |
this.setState({ Component }) | |
}) | |
} |