---
title: "Discussion on \"Automatic scrolling for Chat app in 1 line of code + React hook\" | Hashnode"
description: "Discussion on \"Automatic scrolling for Chat app in 1 line of code + React hook\". Whenever you get a new message the chat feed automatically scrolls to the bottom. This guide explains how you can do it in just 1 line of code."
url: "https://hashnode.com/posts/automatic-scrolling-for-chat-app-in-1-line-of-code-react-hook/61a0c9cd9829fb749bcc00e9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Automatic scrolling for Chat app in 1 line of code + React hook](https://deepcodes.hashnode.dev/automatic-scrolling-for-chat-app-in-1-line-of-code-react-hook?utm_source=hashnode&utm_medium=feed)

Whenever you get a new message the chat feed automatically scrolls to the bottom. This guide explains how you can do it in just 1 line of code.

Nov 26, 2021 · 2 min read · deepcodes.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Deepankar](https://hashnode.com/@deepcodes)

@deepcodes

  
[View profile](https://hashnode.com/@deepcodes)

20yo bridging b/w programming and design

20yo SDE @100ms.live Founder of chloromaps.com Coronasafe Fellow '21

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
