Skip to content

to fix issue on Android device#198

Open
delonzhou wants to merge 1 commit into
xcarpentier:masterfrom
delonzhou:patch-1
Open

to fix issue on Android device#198
delonzhou wants to merge 1 commit into
xcarpentier:masterfrom
delonzhou:patch-1

Conversation

@delonzhou

Copy link
Copy Markdown

No description provided.

@GrahamEvans31

Copy link
Copy Markdown

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

@MateusArenas

Copy link
Copy Markdown

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

khanw-hss commented May 8, 2024

Copy link
Copy Markdown

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