alvarotrigo / react-fullpage

Official React.js wrapper for fullPage.js https://alvarotrigo.com/react-fullpage/
GNU General Public License v3.0
1.28k stars 179 forks source link

prevent rerender on scroll.. #407

Open Pleizz opened 1 year ago

Pleizz commented 1 year ago

react-fullpage calls render function with event like onLeave, afterLoad events.. that leads too many rerenders..

so.. i've developed to render empty div if component's index isn't current index.

but not resolved since it calls twice per scroll (onLeave, afterLoad) and result in render hundreads of empty components twice..

is there any way to reduce rerender number of times? i render about hundreads of elements with memoization..

sincerely..

alvarotrigo commented 1 year ago

What is exactly the problem you face with the re-renders?

When scrolling up/down on the example I can't see any re-writes on the DOM except the necessary ones with the state classes.