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

Not working in IE11. #25

Closed rblakejohnson closed 6 years ago

rblakejohnson commented 6 years ago

Has anyone else experienced issues in IE11? Nothing is rendered in the DOM. If I use the react-on-screen component with render props to render another component if isVisible is true (like the example in the readme) nothing is rendered in the DOM. If I use the isVisible flag to change the color of an element where red is visible and blue is not visible it's always blue, the falsey color. Maybe I'm missing something. Any ideas?

fkhadra commented 6 years ago

Hello @rblakejohnson,

I'll check tomorrow at the office what is happening with IE11.

rblakejohnson commented 6 years ago

@fkhadra turns out it was an issue with gatsbyjs and was solved with a polyfill. Thanks for your efforts and writing react-on-screen 👍

fkhadra commented 6 years ago

@rblakejohnson perfect!