Giter Club home page Giter Club logo

react-flux-typescript-todomvc's Introduction

TypeScript & Flux/React TodoMVC Example

TypeScript is a language for application-scale JavaScript development. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. Any browser. Any host. Any OS. Open Source.

TypeScript - typescriptlang.org


Flux is the application architecture that Facebook uses for building client-side web applications. It complements React's composable view components by utilizing a unidirectional data flow.

Flux - facebook.github.io/flux


React is a Javascript library for building user interfaces. React uses a virtual DOM diff implementation for ultra-high performance.

React - facebook.github.io/react

Learning TypeScript

The TypeScript website is a great resource for getting started.

Here are some links you may find helpful:

Articles and guides from the community:

Get help from other TypeScript users:

If you have other helpful links to share, or find any of the links above no longer work, please let us know.

Implementation

This application is a port of the flux-todomvc example, which is part of Facebook's Flux project.

The original example uses JSX, which is a a JavaScript syntax extension that looks similar to XML. Transforming JSX to Javascript is pretty easy as James Brantly explained in his recent React.js Conf 2015 talk Static typing with Flow and TypeScript.

James Brantly's reactconf uses webpack and ts-jsx-loader. This project on the other hand uses grunt and grunt-text-replace with react-tools and grunt-browserify instead.

The main reason for choosing browserify over webpack is that browserify injects node.js polyfills like EventEmitter, which are used by the original flux-todomvc example.

During the build phase all *.tsx and *.ts are first being copied to a temporary ./build folder and then compiled to Javascript using the Typescript compiler. A second pass then intelligently replaces React.jsx(...) with transformed JSX code. For more details see ./grunt/replace.js. The build mechanics are all implemented in ./grunt/aliases.js. The output folder is ./web.

This project also supports minification using Google's Closure Compiler.

Running

You must have node.js installed on your computer, which includes npm. From the root project directory run these commands from the command line:

npm install

That will install all dependencies and build web/js/bundle.js, which is used by web/index.html. Once you've built the project you can open web/index.html in your browser, or simply run npm start.

Demo

Please try this live demo:
https://bparadie.github.io/fluxts-todomvc

react-flux-typescript-todomvc's People

Contributors

publicparadise avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.