Port to TypeScript and upgrade to React 0.12.