DEV Community

Cover image for Make a reading progress bar for your blog 📊

Make a reading progress bar for your blog 📊

Rob OLeary on April 21, 2020

Can we add anything to a standard blog that would enhance the reading experience? How about a reading progress bar? The Progress Bar T...
Collapse
 
supermavster profile image
Miguel Ángel

Hello, first excellent post but I have a problem, I don't know what happens, help please:

Uncaught ReferenceError: entry is not defined  at IntersectionObserver.handler
Enter fullscreen mode Exit fullscreen mode
Collapse
 
supermavster profile image
Miguel Ángel

I found the error when I compress the code with a web package, the conversion is not the better. Only no compress the code or validate de data in the each

Collapse
 
robole profile image
Rob OLeary

Hi Miguel,

This is probably an issue with your webpack configuration. I wouldn't be able to say what the issue is without seeing what you're doing. Try posting your code on StackOverflow to get help there.

Collapse
 
orenmizr profile image
Oren Mizrahi

Hi Rob, enjoyed reading. shouldn't you de-bounce the scroll events. If i remember correctly there are too many on each scroll. for optimization purposes.

Collapse
 
robole profile image
Rob OLeary

I added a section about optimization if you are interested Oren!

Collapse
 
robole profile image
Rob OLeary • Edited

Thanks Oren. Yes, you could optimize the code by debouncing. Maybe I will add this to the article. I wanted to focus on explaining how to implement this without going too far into more complex territory!

Collapse
 
ziizium profile image
Habdul Hazeez

Thank you for sharing.

Collapse
 
robole profile image
Rob OLeary

Youre welcome Habdul 🙂

Collapse
 
robole profile image
Rob OLeary

Do you have any ideas about adding something to your blog?