I'm trying to wrap my head around RxJS. While doing some testing, I ran into something that I can't figure out.
Here is the code :
let product = { id: 1, description: 'table' };
const asyncProduct = timer(2000).pipe(() => of(product));
asyncProduct.subscribe(data=>console.log(data))
I expected product to be logged into my console after 2 seconds, however, it logs right away for some reason. What do I misunderstand? Thanks.