Skip to content

Instantly share code, notes, and snippets.

@NyaGarcia
Created April 24, 2020 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NyaGarcia/dea1b69a708c4ed08f9110d61928f0af to your computer and use it in GitHub Desktop.
Save NyaGarcia/dea1b69a708c4ed08f9110d61928f0af to your computer and use it in GitHub Desktop.
Using switchMap to get fromFetch data
// If we just want the data, we can do something like this
ghibliFilmResponse$
.pipe(switchMap(response => response.json()))
.subscribe(console.log);
// [Object, Object, Object...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment