Skip to content
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.

cassilup/ts-the-good-cop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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! :)