react-native-pdf-renderer icon indicating copy to clipboard operation
react-native-pdf-renderer copied to clipboard

Support for React Native New Architecture

Open Mahmood-AlHajjo opened this issue 1 year ago • 4 comments

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!

Mahmood-AlHajjo avatar Dec 01 '24 10:12 Mahmood-AlHajjo

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 avatar Dec 01 '24 11:12 douglasjunior

@douglasjunior Thank you for your response.

I'd appreciate any updates or an estimated timeline.

Mahmood-AlHajjo avatar Dec 05 '24 11:12 Mahmood-AlHajjo

@douglasjunior Could you please provide any updates?

Mahmood-AlHajjo avatar Dec 09 '24 16:12 Mahmood-AlHajjo

@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.

youedd avatar Dec 29 '24 17:12 youedd

After 8 hours of word and a big fight with the lack of information in the RN new architecture docs.

New architecture is here: https://github.com/douglasjunior/react-native-pdf-renderer/releases/tag/2.0.0

douglasjunior avatar Jun 29 '25 02:06 douglasjunior