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
# Tinkering | |
## Checkbox -- `no conditional` statements | |
#### Challenge | |
Create a checkbox component and handle boolean logic without using any `if` or `ternary` statements. Checkbox component should support `onChange` callback property, with string value as an argument result, i.e. `Unchecked` and `Checked` states. | |
**Advanced**: |
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
#!/bin/bash | |
declare -A EXCLUDED_FILES=( | |
[config]=1 | |
[status.json]=1 | |
[latest]=1 | |
[PostProcessing]=1 | |
) | |
declare -a CLEANUP_LOCATIONS=( |
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, { Component } from 'react'; | |
import firebase from 'firebase'; | |
import { browserHistory } from 'react-router'; | |
import { routeCodes } from 'routes'; | |
import FormLogin from 'components/form/Form.login'; | |
export default class Login extends Component { | |
constructor (props) { | |
super(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
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import firebase from 'firebase'; | |
import { browserHistory } from 'react-router'; | |
import { routeCodes } from 'routes'; | |
export default class App extends Component { | |
static propTypes = { | |
children: PropTypes.object.isRequired |
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, { Component } from 'react'; | |
import { Router, Route, IndexRoute, browserHistory } from 'react-router'; | |
import App from 'containers/core/App'; | |
import Login from 'containers/views/Login'; | |
import Admin from 'containers/views/Admin'; | |
import Home from 'containers/views/Home'; | |
const publicPath = '/'; |
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'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const PreloadWebpackPlugin = require('preload-webpack-plugin'); | |
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin'); | |
const StyleExtHtmlWebpackPlugin = require('style-ext-html-webpack-plugin'); | |
const CompressionPlugin = require('compression-webpack-plugin'); | |
const autoprefixer = require('autoprefixer'); |
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 sequence = () => compose.apply(this, Array.prototype.slice.call(arguments).reverse()); | |
const pipe = (...fns) => x => fns.reduce((y, f) => f(y), x); | |
const compose = (fn, ...rest) => | |
(!rest.length && Boolean(fn)) ? | |
fn : | |
(prop, ...args) => | |
fn(compose(...rest)(prop, ...args), ...args); |