This file contains 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
function cloneProps(props) { | |
const propKeys = Object.keys(props); | |
return propKeys.reduce((memo, k) => { | |
const prop = props[k]; | |
memo[k] = Object.assign({}, prop); | |
if (isObject(prop.value) && !isFunction(prop.value) && !Array.isArray(prop.value)) memo[k].value = Object.assign({}, prop.value); | |
if (Array.isArray(prop.value)) memo[k].value = prop.value.slice(0); | |
return memo; | |
}, {}); | |
} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>First React App</title> | |
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
<script src='https://unpkg.com/babel-standalone@6/babel.min.js'></script> | |
</head> | |
<body> | |
<div id='app'></div> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>First React App</title> | |
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
<script src='https://unpkg.com/babel-standalone@6/babel.min.js'></script> | |
</head> | |
<body> | |
<div id='app'></div> |
This file contains 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 no-undef, react/prop-types */ | |
import React from 'react'; | |
import { css } from 'react-emotion'; | |
import { Box, Flex } from '../../components/Layout'; | |
import colors from '../../utils/colors'; | |
import ButtonPrimary from '../../components/Buttons'; | |
const input = css` | |
display: block; | |
box-sizing: border-box; |
This file contains 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 webpack = require('webpack') | |
var fs = require('fs'); | |
var nodeModules = {}; | |
fs.readdirSync('node_modules') | |
.filter(function(x) { | |
return ['.bin'].indexOf(x) === -1; | |
}) | |
.forEach(function(mod) { | |
nodeModules[mod] = 'commonjs ' + mod; |