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 PopoverExample extends React.Component { | |
state = { | |
isOpen: false, | |
}; | |
toggle = () => { | |
this.setState(state => ({ | |
isOpen: !state.isOpen, |
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 toClass from 'recompose/toClass'; | |
export default function debug(WrappedComponent) { | |
if (typeof WrappedComponent === 'function') { | |
WrappedComponent = toClass(WrappedComponent); | |
} | |
return class Enhancer extends WrappedComponent { |
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
'use strict'; | |
const autoprefixer = require('autoprefixer'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const path = require('path'); | |
const { | |
CheckerPlugin, | |
TsConfigPathsPlugin, | |
} = require('awesome-typescript-loader'); | |
const HappyPack = require('happypack'); |
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 * as Joi from 'joi'; | |
import * as monk from 'monk'; | |
export interface DaoProps { | |
/** | |
* Name of table | |
*/ | |
name: string; | |
/** |
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 Route from 'react-router-dom/Route'; | |
import Link from 'react-router-dom/Link'; | |
import Switch from 'react-router-dom/Switch'; | |
const App = ({ routes, initialData }) => { | |
return routes | |
? <div> | |
<Switch> | |
{routes.map((route, index) => { |
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 { injectAddRule, resetCache } from 'jsxstyle/lib/styleCache'; | |
import App from './App'; | |
import React from 'react'; | |
import { StaticRouter } from 'react-router-dom'; | |
import express from 'express'; | |
import path from 'path'; | |
import { renderToString } from 'react-dom/server'; | |
const assets = require(process.env.RAZZLE_ASSETS_MANIFEST); |
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 path = require('path'); | |
module.exports = { | |
webpack: (config, options, webpack) => { | |
// change Backpack's default entry point to 'src/server.js' | |
config.entry.main = path.join(__dirname, 'src/server.js'); | |
// Tell Backpack how to handle .css files (load into memory and noop) | |
config.module.rules.push({ |
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": [ | |
"react-app" | |
] | |
} |