Giter Site home page Giter Site logo

psgsreactprogrxjs's Introduction

psgsreactprogrxjs

##2. Observers and Observables ###2 Reactive Programming

var result = movies.filter(function(movie){
  return movie.fitle[0] ==='4';
});

###3 Installing RxJS with npm

npm install rxjs --save
npm install webpack webpack-dev-server typescript typings ts-loader --save-dev
node_modules\.bin\typings install dt~es6-shim --global --save 

###4 Configuration and Setup

touch tsconfig.json

edit

{
  "compilerOptions":{
    "target":"es5",
    "module":"commonjs",
    "sourceMap":true
  }
}

then

touch webpack.config.js
module.exports = {
  entry:"./main",
  output:{filename:'app.js'},
  module:{
    loaders:[
      {
        test: /.ts$/,
        loader: "ts-loader"
      }
    ]
  },
  resolve:{
    extension:["",".ts",".js"]
  }
}

##3. Working with Observables ###6 Set up to Use the New Fetch Standard

node_modules\.bin\typings uninstall dt~es6-shim --global --save 
node_modules\.bin\typings install dt~whatwg-streams --global --save 
node_modules\.bin\typings install dt~whatwg-fetch --global --save 

tsconfig.json edit

{
  "compilerOptions":{
    "target":"es6",
    "module":"commonjs",
    "sourceMap":true
  }
}

###7 Using fetch and Promises ####3:50 lazy loading

return Observable.defer(()=>{
})

##4. Working with Observable Data ###3 Dealing with Errors and Exceptions

let source = Observable.merge(
  Observable.of(1),
  Observable.from([2,3,4]),
  Observable.throw(new Error("stop"))
);

Resume errors

Observable.onerrorResumeNext

psgsreactprogrxjs's People

Contributors

rengokantai avatar

Watchers

James Cloos avatar  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.