Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to fix issue on Android device #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

delonzhou
Copy link

No description provided.

@GrahamEvans31
Copy link

How to get this fix into production? I'm having same issues with the error on Android

@MateusArenas
Copy link

How to get this fix into production? I'm having same issues with the error on Android

try this to resolve:

import PDFReader, { Props } from 'rn-pdf-reader-js'

class MyPDFReader extends PDFReader {
  constructor(props: Props | Readonly<Props>) {
    super(props);
    this.state = { ...this.state, renderedOnce: true };
  }
}

....

return (
   <MyPDFReader 
       source={{ uri: uri }}
       ....
   />
)

@khanw-hss
Copy link

khanw-hss commented May 8, 2024

Hi, will this be merged into master or is there a solution for JS / React Native?

Update:
The above fix by extending the class and adding the "renderedOnce" property worked. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants