This project includes a working example of React, React Router, and TypeScript.
All the code is in TypeScript, written as either
The gulp-based build generates a browserified client file which is separate from the vendor file.
The vendor file currently includes react and react-router.
This separation speeds up the build process and can result in fewer client downloads when new builds are released.
The gulp build process works with gulp.watch.
This is a basic starter project with a minimal number of views and components. Many recent React examples are written in ES6 and make use of Babel. These are largely compatible with this TypeScript based process.
This starter also includes an example of how to use Redux with TypeScript. In order to keep the starter as clean as possible, the Redux example is on a branch.
This template supports the following versions for key dependencies:
You'll need a few frameworks and utilities to be installed before starting.
You'll need the following prior to setup:
This will get all the packages required for development and run time,
as defined in the
> npm install
To run a full build, just run gulp with no arguments.
You can also use
> npm run build
Run watch and keep the console open.
> gulp watch
Gulp will automatically rebuild when a source file or CSS file changes.
Run this command:
> npm run dev
Then open a browser and navigate to http://localhost:3000 to view.
> gulp serve
This will launch at a different port since it proxies Express.
A simple starter project can be found at react-tsx-lite.
BSD (the same as React)