Closed luciancic closed 10 months 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 | Oct 19, 2023 9:04pm |
@luciancic Thanks, as you said I have also experienced the issue that some books dont react to the next button, but I have not connected it to having a zero number ;-)
Not sure null is a good option though, it might be that loction only should be a string, since that is what epubjs is passing back in the loctionChange.
@luciancic Have added null as a allowed type for location-prop, but I reverted the change inital type in example, since I think 0 is a better inital prop when you open an new epub (and dont have a previous location to restore).
As you mention there was something missing in the epub, so I did update the alice-example from gutenberg, and now setting inital loction to 0 dont break the next page button. See example here https://react-reader.metabits.no/
Thank for your help and the update is published in react-reader@2.0.4
Loving this lib. But got tripped up by the minimal example. Proposing 3 changes:
epubcifi
. Should beepubcfi
(CFI is canonical fragment identifier, today I learned something new 🎉).0
to1
ornull
it would work, because it would start off after the cover page.Some extra notes on point 3: I got this error with the default "https://react-reader.metabits.no/files/alice.epub", and I tested with other books too, mostly from https://www.epubbooks.com/. I'm wondering if I'm the only one who had that issue, I could not find any issues or discussion about this here. I tried validating the epubs using https://www.epubvalidation.com and got this error: Non-linear content must be reachable, but found no hyperlink to "OEBPS/cover.xhtml" I'm using this in a capacitor app, latest react-reader version, same issue on all platforms. Maybe point 3 is more contentious and could require some discussion, so we could leave it out of the PR and just do 1 and 2, and open an issue for 3? Any thoughts?