I have a React component that displays chat messages. When the component initially loads or when new messages are added, I want the viewport to be automatically view the bottom of the chat, ensuring that the latest messages are visible.

Now what I have succeeded in doing is making the view scroll down but I want the view to immediately display the bottom page without scrolling

New contributor

MICROCATS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1