cassilup / ts-the-good-cop

Playground for TypeScript: The Good Cop talk

Home Page:https://speakerdeck.com/cassilup/typescript-the-good-cop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScript: The Good Cop

Playground for TypeScript: The Good Cop

1. Install dependencies

yarn

Run npm run dev.

Check out http://localhost:4001.

2. Bring in React

yarn add react react-dom

Add this to index.tsx:

import * as React from "react";
import * as ReactDOM from "react-dom";

ReactDOM.render(
  <div>
    Hello from React!
  </div>,
  document.getElementById("root")
);

Re-run npm run dev.

Watch the errors.

Also check out the console for http://localhost:4001.

3. Bring in Types

yarn add --dev @types/react @types/react-dom

Re-run npm run dev.

Check out http://localhost:4001.

Enjoy! :)

About

Playground for TypeScript: The Good Cop talk

https://speakerdeck.com/cassilup/typescript-the-good-cop


Languages

Language:JavaScript 71.3%Language:HTML 20.2%Language:CSS 4.7%Language:TypeScript 3.7%