Closed eliot-akira closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
react-reader | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 11, 2023 8:02pm |
@eliot-akira Thanks, published to react-reader@1.2.2 now!
I was having an issue where
EpubView
wasn't refreshing when a new URL was passed, and I think I found a bug inshouldComponentUpdate
.https://github.com/gerhardsletten/react-reader/blob/ab051bc1d191725b2836015750290d53828595dd/src/modules/EpubView/EpubView.js#L54-L60
It's comparing the same
location
prop twice, but I believe it was meant to compare the URL.With this change, the component re-renders as expected when a new URL is passed.