Open LucDelp opened 4 years ago
It's a bug, same problem here.
Cool!
@LucDelp try to add key={url}
in your props.
Unbeautiful workaround:
...
const [renderCounter, setRenderCounter] = useState(0);
...
useEffect(() => {
setRenderCounter(renderCounter + 1);
}, [url]);
...
<PDFReader
key={renderCounter}
url={url}
...
/>
...
I just add a key with URL and it woke fine
<PDFReader key={url} url={url} ... />
Hello ! I'm currently facing an issue with this pdf reader. My pdf url changes according to a params of my component but even though its url props has been updated, the component doesn't fetch at the specified url. I'm maybe doing something wrong but I just can't see it.
I could not find any better module to display my pdfs in react so thank you for your job!