Increasing the Reactiveness Using Operators
Explore how to enhance the reactiveness of RxJS streams by using operators such as flatMap. This lesson explains transforming JSONP data into observables and merging streams to handle real-time earthquake data more efficiently without manual loops or conditionals.
We'll cover the following...
What is JSONP?
JSONP, or JSON with padding, is a sneaky technique that web developers came up with to work around browser restrictions when requesting data from third-party domains.
JSONP bypasses these restrictions by loading external content with script tags, instead of the usual XMLHttpRequest. Adding a script tag to the DOM loads and executes its content directly, and the security restrictions are not applied.
The remote request’s content is, then, a normal JSON wrapped in a function call (the “P” in ...