DEV Community

Discussion on: React: Super Simple Smooth Scrolling

Collapse
 
lukad profile image
Luka Dornhecker

I think this is an anti pattern. You should not mess with the default scroll behavior. On desktop I immediately leave sites that do this. And this example also makes scrolling on mobile feel very weird.
Sorry for being so negative but this is just my honest opinion.

Collapse
 
jifakir profile image
JI Fakir

This is a skill. He didn't force you to use everywhere. This skill has specific use case. So, what's the problem to learn? But I bet today or tomorrow you are gonna use this effect on your website if you are a developer. Because it doesn't a matter if you like or not, client demand is your work.

Collapse
 
lukad profile image
Luka Dornhecker • Edited

You make a lot of assumptions about my work... Learning is never a problem and no, no one forced me to use this. I stand by my original comment though. I believe this is an anti pattern and should not be implemented. If your goal is to programmatically and smoothly scroll to a specific element on a page then scroll-behavior: smooth; is your friend.

Thread Thread
 
jifakir profile image
JI Fakir

scroll-behavior isn't what author tried to explain. for better understanding try to learn trendy Parallax effect.

Thread Thread
 
lukad profile image
Luka Dornhecker

This post is not about parallax scrolling. Your condescending tone is really not appropriate here.

Thread Thread
 
jifakir profile image
JI Fakir • Edited

ha ha ha, did you visit his demo? It's a full page scrolling, not specific section. Did he explain about scroll-behavior property? Anyway, if it is possible what is in his demo with scroll-behaviour, why aren't you show us a demo. I know very well you will not be able to show. Because, it's not possible at this moment.

Thread Thread
 
lukad profile image
Luka Dornhecker

Yes, I checked out the demo. What is implemented there is exactly what I'm saying should be (and is by many) considered an anti pattern. I already gave you an example where scroll-behaviour: smooth; can be used. And luckily it does not behave like the demo. Anyways... you're being insanely rude. Considered yourself blocked. Hope you get better.