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
// Root.js | |
const Root = () => | |
<Router> | |
<Route component={UserScene} path="/users/:userId" /> | |
</Router>; | |
export default Root; | |
// UserDetailsScene.js | |
const USER_DETAILS_FRAGMENT = gql` |
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
schema { | |
query: Query | |
} | |
type Query { | |
namespaces: AllNamespacesConnection | |
users: AllUsersConnection | |
} | |
interface Node { |
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
// @flow | |
import { isEqual, noop } from 'lodash/fp'; | |
import React, { Component, createFactory } from 'react'; | |
import { setDisplayName, wrapDisplayName } from 'recompose'; | |
import debounce from 'common/utilities/debounce'; | |
const withSubmitOnChange = (BaseComponent: Class<*>) => { | |
const factory = createFactory(BaseComponent); | |
type Props = { |
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
const withValues = mapProps(p => ({ | |
...p, | |
onEvent: val => p.onEvent(val) | |
.then(res => res.data.val) | |
.catch(res => Promise.reject(res.data.errors)) | |
})); | |
const withEffect = mapProps(p => ({ | |
...p, | |
onEvent: val => p.onEvent(val) |
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
// @flow | |
import { withFormik } from 'formik'; | |
import { compose, pick } from 'lodash/fp'; | |
import PropTypes from 'prop-types'; | |
import { withContext, withHandlers } from 'recompose'; | |
type Config = Object; | |
const withForm = (config: Config) => { | |
const HOC = compose( |
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
// @flow | |
import { withFormik } from 'formik'; | |
import { compose, pick } from 'lodash/fp'; | |
import PropTypes from 'prop-types'; | |
import { withContext, withHandlers } from 'recompose'; | |
type Config = Object; | |
const withForm = (config: Config) => { | |
const HOC = compose( |
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
// @flow | |
import { withFormik } from 'formik'; | |
import { compose, pick } from 'lodash/fp'; | |
import PropTypes from 'prop-types'; | |
import { withContext, withHandlers } from 'recompose'; | |
type Config = Object; | |
const pickFormikBag = pick([ | |
'values', |
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
// @flow | |
import type { Children } from 'react'; | |
import Hidden from 'components/Hidden'; | |
const renderNoop = () => null; | |
type Props = { | |
condition: any, | |
persistent?: boolean, | |
renderLeft: () => Children, |
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
FROM node:11.1.0-alpine AS node_base | |
FROM node_base as deps | |
WORKDIR /usr/app | |
COPY package.json /usr/app/package.json | |
COPY yarn.lock /usr/app/yarn.lock | |
RUN yarn install | |
FROM node_base as build | |
WORKDIR /usr/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
node_modules | |
dist |