beekai-oss / react-simple-img

🌅 React lazy load images with IntersectionObserver API and Priority Hints
MIT License
989 stars 41 forks source link

Issue with react-router #34

Closed Tailzip closed 5 years ago

Tailzip commented 5 years ago

Hi,

I'm using both react-router and react-simple-img in my project.

When I'm navigating from a page to another that have <SimpleImg /> component(s) wrapped within a <SimpleImgProvider />, it breaks (blank page).

I'm getting the following error in the console: TypeError: window.__REACT_SIMPLE_IMG__ is undefined.

Any thoughts how to fix that? Thanks!

Tailzip commented 5 years ago

Actually, when building a small app using create-react-app to replicate the issue, it is working. So I guess it has something to do with other dependencies on my project or my setup. Closing it for now, sorry for the inconvenience 😅