react-reader
react-reader copied to clipboard
Arrows (and navigation) not working in React.StrictMode
I'm using react-reader for my project, but arrows do not allow to get to another page of the book. Epub seems to be working fine, you can get to different places using chapters at the beginning of the book. Does anyone have any idea why that is going on?
Ok I checked and the location is actually changing but nothing new is being displayed. Why could that be?
@agatumm420 Still not solved? Try with the demo-book (https://react-reader.metabits.no/files/alice.epub) or share a example
Also have the same problem, using the exact same snippet on the README tutorial.
Setting epub location on localStorage and then retrieving it on first render actually works, and the page changes, but the arrow keys don't change the epub page.
@Lamarcke Could you please publish an example where this is not working. Just checked https://react-reader.metabits.no/ and arrow works for me.
I am having the same problem and just created a sample project with the issue: https://github.com/Gremash/react-reader-test
I built and deployed the app to Firebase and it works in the cloud: https://react-reader-test.web.app/. It just isn't working when running locally using npm start. Interesting enough it also works using serve
against the production build i.e., serve -s build
@Gremash @Lamarcke Did have a look at the sample repo now, and looks like you need to remove <React.StrictMode>
in index.js.
Have to look more into this after vacation how to make the component support strict mode..
Thank you for your time. I hasn't expecting something like this, but i'm glad there's a way to use your library in my project now, thanks.
I've submit PR to fix this issue #123
@azu Published in [email protected]