mattermost / react-native-paste-input

React Native TextInput replacement to allow pasting files
MIT License
89 stars 15 forks source link

fix: remove deprecated setAndForwardRef #21

Closed yigitcan-prospr closed 11 months ago

yigitcan-prospr commented 11 months ago

Issue

Can't resolve 'react-native/Libraries/Utilities/setAndForwardRef'

Summary

This library used setAndForwardRef from react-native internal functions which starting from RN v0.72 is no longer included (https://github.com/facebook/react-native/commit/bf6ed07c0f01f788e6554ad63c958feec3d2eb0c). This PR removes the imports from react-native/Libraries/Utilities and uses the setAndForwardRef.ts from previous RN versions (https://github.com/facebook/react-native/blob/7cf4cf3afbea4463427944fbed30768a796db724/Libraries/Utilities/setAndForwardRef.js).

mattermost-build commented 11 months ago

Hello @yigitcan-prospr,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Per the Mattermost Contribution Guide, we need to add you to the list of approved contributors for the Mattermost project.

Please help complete the Mattermost contribution license agreement? Once you have signed the CLA, please comment with /check-cla and confirm that the CLA check is green.

This is a standard procedure for many open source projects.

Please let us know if you have any questions.

We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.

enahum commented 11 months ago

Hi @yigitcan-prospr thanks for the PR.

can I ask you to please also update the RN version of the example app so we can quickly check that the changes are working as intended?

I think for the time being we can keep this PR until we move the lib to the new architecture ;)

yigitcan-prospr commented 11 months ago

Hi @yigitcan-prospr thanks for the PR.

can I ask you to please also update the RN version of the example app so we can quickly check that the changes are working as intended?

Sure thing.

I think for the time being we can keep this PR until we move the lib to the new architecture ;)

That's great news! Though currently it's impossible to build after upgrading to 0.72 so I'm assuming many people will create issues about this. I think it might be reasonable to have an intermediate version before the big release with the new architecture support.

enahum commented 11 months ago

The android example app is not building, probably you missed some upgrade changes to build.gradle and settings.settings files