Start Terminal.app and type:
sudo nvram boot-args="kext-dev-mode=1"
Verify that command works by typing:
sudo nvram -p | grep -i boot-args
# First verify the version of Java being used is not SunJSK. | |
java -version | |
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html | |
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm | |
# Rename the file downloaded, just to be nice | |
mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm | |
# Install Java |
/** | |
* Easing functions | |
* | |
* https://gist.github.com/gre/1650294 | |
* http://easings.net | |
*/ | |
// no easing, no acceleration | |
export function easeLinear(t){ return t } | |
// accelerating from zero velocity | |
export function easeInQuad(t){ return t*t } |
import * as React from 'react' | |
// routing, etc. | |
import { Reset } from '~/ui/shared/Reset' | |
export class App extends React.Component { | |
public render() { | |
return ( | |
<div> | |
<title>Dashboard</title> |
import * as React from 'react' | |
import * as Redux from 'redux' | |
import { MyReduxState } from './my-root-reducer.ts' | |
export interface OwnProps { | |
propFromParent: number | |
} | |
interface StateProps { |
Related discussion on bvaughn/react-window/issues/85.
The specific API feature this Gist is exploring is the itemData
prop. This prop provides a way for a component to pass "contextual" list data to an item renderer without adding the overhead of using context. In most cases, a single value is passed (e.g. an array/list) like so:
function ComponentThatRendersAListOfItems({ itemsArray, ...rest }) {
render() {
// Pass items array to the item renderer component as itemData:
return (
Create React App does not provide watching build mode oficially (#1070).
This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.
Create a React app.
Put the script into scripts/watch.js
.
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import configureStore from "./store/configureStore"; | |
const store = configureStore(); | |
const rootEl = document.getElementById("root"); |
This is my typical decorator stack for a 'smart component' used as the component for react-router
route.
Note some code is missing here but this should give you the idea.
Example usage:
StateDetailsScene.js
import React from 'react'
import _ from 'lodash'
import route from 'core/decorators/route'