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

Support for React Native New Architecture #31

Open
Mahmood-AlHajjo opened this issue Dec 1, 2024 · 4 comments
Open

Support for React Native New Architecture #31

Mahmood-AlHajjo opened this issue Dec 1, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Mahmood-AlHajjo
Copy link

Will react-native-pdf-renderer support React Native's new architecture ?
If not yet, are there plans to implement it, and is there an estimated timeline?

Thanks!

@douglasjunior
Copy link
Owner

I have tried the new architecture in the past, but due to the lack of support from the React Native team and poor documentation, I haven't been able to find a suitable replacement for some of the APIs used in this library, such as event emission from native code to JavaScript. As a result, I've decided to give up.

With RN 0.76, things may have changed, but I need to review it again.

@douglasjunior douglasjunior added the enhancement New feature or request label Dec 1, 2024
@Mahmood-AlHajjo
Copy link
Author

Mahmood-AlHajjo commented Dec 5, 2024

@douglasjunior Thank you for your response.

I'd appreciate any updates or an estimated timeline.

@Mahmood-AlHajjo
Copy link
Author

@douglasjunior
Could you please provide any updates?

@youedd
Copy link

youedd commented Dec 29, 2024

@Mahmood-AlHajjo in case it helps !

I managed to use this package with the new architecture using the Interop Layer.

You will have to edit react-native.config.js

module.exports = {
  project:{
    android: {
      unstable_reactLegacyComponentNames: [ "RNPdfRendererView" ]
    },
    ios: {
      unstable_reactLegacyComponentNames: [ "RNPdfRendererView" ]
    }
  },
};

@douglasjunior can that be added to the documentation as a workaround while waiting for new architecture support 🙏

Let us know if help is needed supporting the new architecture.

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

No branches or pull requests

3 participants