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
export default React.createClass({ | |
displayName: 'Oceans Navigation Category', | |
propTypes: { | |
list: React.PropTypes.arrayOf( | |
React.PropTypes.shape({ | |
humanReadableName: React.PropTypes.string, | |
url: React.PropTypes.string | |
}) |
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
// bootstrap React Router | |
import React from 'react'; | |
import { default as Router, Route, DefaultRoute, HistoryLocation, RouteHandler } from 'react-router'; | |
import { Splash } from '../components_angular/splash'; | |
import index from './index'; | |
let oceans; | |
if (!PRODUCTION) { | |
oceans = ( | |
<Route handler={require('./oceans/navigation')} path='oceans'> |
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
import React from 'react'; | |
const Component = React.Component; | |
import angular from 'angular'; | |
const jqLite = angular.element; | |
export default function(outerHTML) { | |
class Wrapper extends Component { | |
static displayName = `React wrapper around Angular fragment ${outerHTML}`; |
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
April's Aphorisms & Principles: | |
* [Rethink best practices](https://www.youtube.com/watch?v=x7cQ3mrcKaY). | |
* [A dogma is born when the solutions are presented without enough original context, | |
and newcomers feel pressured to delegate crucial decisions to an authority](https://medium.com/@dan_abramov/the-case-for-flux-379b7d1982c6) | |
* We like nice things: | |
* Pure functions when practical, side effects when necessary. | |
* Self contained, testable modules that do not leak implementation |
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
// April Arcus 2015 Public Domain | |
// A higher order React component that will emulate CSS :hover, :active, | |
// and :focus pseudo selectors by decorating a component with appropriate | |
// listeners, tracking internal state, and passing it to the component | |
// argument as additional props. | |
// Somewhat like Radium, but will not interfere with the use of these | |
// same event listeners inside the decorated component. |
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
var webpack = require('webpack'); | |
module.exports = { | |
devtool: 'eval', | |
entry: [ | |
'./scripts/index' | |
], | |
output: { | |
path: __dirname + '/scripts/', | |
filename: 'bundle.js', |
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
# While GNU coreutil's ls is generally more featureful (including colorization | |
# based on file extensions, SI size formats, ISO date and time formats, | |
# semantic version sort, etc.), OS X's fork of FreeBSD ls allows viewing HFS+ | |
# extended attributes and access control lists through the -@ and -e flags, | |
# respectively. | |
# | |
# This script provides a shim to allow BSD ls to be invoked with GNU-style | |
# flags and .dircolor files, and a function that shadows ls, invoking coreutils | |
# ls by default but automatically switching to the shim when the -@ and/or -e | |
# flags are detected. |
NewerOlder