Skip to content

Instantly share code, notes, and snippets.

@josersleal
josersleal / introrx.md
Created April 23, 2019 17:55 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@josersleal
josersleal / recipe.example.md
Created January 30, 2018 11:08 — forked from peterbsmyth/recipe.example.md
Making chained API Calls using @ngrx/Effects

Making chained API Calls using @ngrx/Effects

Purpose

This recipe is useful for cooking up chained API calls as a result of a single action.

Description

In the below example, a single action called POST_REPO is dispatched and it's intention is to create a new repostiory on GitHub then update the README with new data after it is created.
For this to happen there are 4 API calls necessary to the GitHub API:

  1. POST a new repostiry
  2. GET the master branch of the new repository
  3. GET the files on the master branch
@josersleal
josersleal / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console