Skip to content

Instantly share code, notes, and snippets.

<style>
.container {
height: 200px; /* Set a fixed height for the scrollable area */
overflow: auto;
display: flex;
flex-direction: column-reverse; /* Reverses the order, so bottom is treated as top */
}
.content-wrapper {
display: flex;
@anaval99
anaval99 / conditional-share.ts
Created November 8, 2025 17:33
Conditional Observable sharing
import {
of,
from,
defer,
Observable,
Subject,
MonoTypeOperatorFunction,
} from 'rxjs';
import { tap, delay, switchMap, flatMap, shareReplay } from 'rxjs/operators';
const start = Date.now();