Sign in
Log inSign up
Avneesh Agarwal

112 likes

·

18.2K reads

6 comments

Simona Winnekes
Simona Winnekes
Sep 12, 2021

Nice article!

If you want to avoid installing dependencies and only need the simplest smooth scrolling I can recommend the css property scroll-behaviour.

But judging from the documentation of react-scroll you can refine the scrolling, that's pretty nifty!

Edit: iOS support for the css property is a bit different, users need to explicitly enable smooth scrolling

4
·
·1 reply
Avneesh Agarwal
Avneesh Agarwal
Author
·Sep 12, 2021

Ah yeah, scroll behavior property is also great but as you said as well react scroll library can help improve and customize it.

3
·
James Q Quick
James Q Quick
Sep 12, 2021

So simple. Nice!

1
·
·1 reply
Avneesh Agarwal
Avneesh Agarwal
Author
·Sep 12, 2021

Thanks, glad you liked it 😁

·
Tapas Adhikary
Tapas Adhikary
Sep 13, 2021

Nice tip. Thanks for sharing Avneesh Agarwal

1
·
·1 reply
Avneesh Agarwal
Avneesh Agarwal
Author
·Sep 13, 2021

Thanks 🙌🏻 Tapas Adhikary

·