---
title: "Comment by Purvi Barot on \"What is an observable\" | Hashnode"
description: "Observables are also like callbacks and promises - that are responsible for handling async requests. Observables are a part of the RXJS library. import { Observ"
url: "https://hashnode.com/posts/what-is-an-observable/5f798be29c3b6e41012170cf/comment/5f7acbd19c3b6e410121802a"
---

[Discussion](https://hashnode.com/posts/what-is-an-observable/5f798be29c3b6e41012170cf)

Comment [What is an observable](https://hashnode.com/posts/what-is-an-observable/5f798be29c3b6e41012170cf)

[Purvi Barot](https://hashnode.com/@purvi)

[Oct 5, 2020](https://hashnode.com/posts/what-is-an-observable/5f798be29c3b6e41012170cf/comment/5f7acbd19c3b6e410121802a)

Observables are also like callbacks and promises - that are responsible for handling async requests. Observables are a part of the RXJS library.

```
import { Observable } from 'rxjs';

const observable = new Observable(subscriber => {
  subscriber.next(1);
  subscriber.next(2);
  subscriber.next(3);
  setTimeout(() => {
    subscriber.next(4);
    subscriber.complete();
  }, 1000);
});
```

**Observable Phases**

-   Creation
-   Subscription.
-   Execution
-   Destruction.

[Lymcode](https://hashnode.com/@RoshanKrSoni)

[Oct 5, 2020](https://hashnode.com/posts/what-is-an-observable/5f798be29c3b6e41012170cf/comment/5f7acbd19c3b6e410121802a#reply-5f7b1f1b9d088e603ef3902e)

Thank you. can we publish it here ?
