...

/

Using Generics With Observables

Using Generics With Observables

Learn how we can take advantage of TypeScript to help us document our request.

We'll cover the following...

Services are classes where we can outsource requests. They’re great because they’re reusable, and we can import them in any number of components.

One of the main issues we face with services is not knowing what to expect when we make a request. The only way we can know is if we look at the documentation of the API. This means that we’ll have to refer to the documentation whenever we want to use the API.

At first, it’s not much of an issue. However, as our app scales, it can become cumbersome to have to go back and forth. One way we can combat this issue is by ...