fkhadra / react-on-screen

Check if a react component in the viewport
https://fkhadra.github.io/react-on-screen/
MIT License
405 stars 50 forks source link

Component could prevent updates propagating through render prop #23

Open tapayne88 opened 6 years ago

tapayne88 commented 6 years ago

Frustratingly, after reading this blog post https://cdb.reacttraining.com/react-inline-functions-and-performance-bdff784f5578 it looks like the shouldComponentUpdate optimisation I included in #21 will prevent prop changes propagating through to components within the render prop :(

fkhadra commented 6 years ago

Hey @tapayne88,

Thanks for the information. I'll read the article tonight. I also want to check if the intersection observer api is a good alternative.