Skip to content

wolfhoundjesse/react-typescript-by-example

Repository files navigation

React TypeScript by Example

First and foremost, much of the work here has been derived from Lemoncode's awesome repo.

About this Project

I spent three years growing alongside Angular and the tooling involved. The experience developing with TypeScript in Visual Studio Code was sublime (ha!), and so I've assembled this repo, with inspiration, to aid others who wish to utilize TypeScript's superpowers when writing React apps. To keep it as simple as possible, parcel-bundler provides a truly zero-configuration process.

Previous React experience is not required.

Each numbered folder will build on the previous folder. This means the instructions in each will closely resemble, "This example builds on XX Name. To begin, copy XX Name into a new location and run npm install. You can also just open each folder step-by-step and continue building in the same directory. 🤷‍ There will definitely be consistency errors to be cleaned up over time.

Caveats

The examples you find here are not the way React TypeScript projects are done; they're done the way that I do them. To quote DrivenData, "Nothing here is binding."

State Management

One of the most time consuming aspects of this project is going to be including various state management libraries/methodologies. You won't see that here for a while, and when I get there, there's no gaurantee you'll see your favorite flavor right away.


Getting Started

  1. Install NodeJS
  2. Download this repo
  3. Open the command line of your choice and cd to a sample directory within this repo on your machine
  4. npm install - Installs packages
  5. npm start - Builds the project and launch a lite web server from parcel.
  6. Navigate to http://localhost:1234/ if your browser doesn't open automatically.

Examples

00 Genesis

A one-file introduction to TypeScript, and Parcel will take care of the install for you.

01 Hello React

Your first Hello World (actually, Hello, React!) written in React and TypeScript. Congrats!

02 Components

Break apart this tiny app to establish a componet pattern that will become synonymous to the way you work with React.

About

Learn to build a React app step-by-step with TypeScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published