Today I saw this React hook (see photo) get shared on birdsite. It enables one to “automatically scroll down when new messages arrive in a chat”.

While it might work, you could — and should — use this little bit of CSS instead:

```
.log {
scroll-snap-type: y proximity;
align-content: end;
}
.log::after {
display: block;
content: "";
scroll-snap-align: end;
}
```

“… remains snapped to the bottom …unless the user has scrolled away from that edge” — https://drafts.csswg.org/css-scroll-snap/#example-d0a2d86f

CSS Scroll Snap Module Level 1

@bramus how does this compare to using `flex-direction: column-reverse;`?
@KitHenry @bramus Was going to ask the same thing, especially combined with the `reverse` attribute on `ol`.
@Siilwyn @KitHenry This approach can unsnap (when scrolling back up) and re-snap again (when scrolling back to the end). AFAIK the `column-reverse` approach doesn’t allow that.