react-native-hyperlink icon indicating copy to clipboard operation
react-native-hyperlink copied to clipboard

Fixed props key was spread into JSX

Open cc-matthias-m opened this issue 1 year ago • 2 comments

Hi,

With the last version of react-native (0.75.4), the package display a warning for a deprecated code :

 ERROR  Warning: A props object containing a "key" prop is being spread into JSX:
  let props = {key: someKey, indicator: ..., style: ..., source: ..., accessible: ..., accessibilityLabel: ...};
  <FitImage {...props} />
React keys must be passed directly to JSX without using spread:
  let props = {indicator: ..., style: ..., source: ..., accessible: ..., accessibilityLabel: ...};
  <FitImage key={someKey} {...props} />

So I create this PR to fix it. As you can see, it’s really a light commit.

This PR work with last react-native version and previous one.

Do you think create a new npm patch 0.0.23 to add this modification ?

Thanks for reading.

cc-matthias-m avatar Oct 14 '24 15:10 cc-matthias-m

@obipawan can this PR be merged in and a new release pushed out? Getting the same issue with React Native 0.76

ericpoulinnz avatar Nov 23 '24 04:11 ericpoulinnz

Can we merge this and get a new version please?

astronawt avatar Jan 30 '25 09:01 astronawt

Can we merge this and get a new version please?

RoiDayan1 avatar Jul 03 '25 06:07 RoiDayan1

We're running into this too. Can we get a new release with this PR merged?

lehresman avatar Sep 17 '25 14:09 lehresman

I am not sure if @obipawan still is interested in maintaining this repo (or has the time), although we and lots others find it helpful. So first: thanks to them for this library!

I took the liberty of forking this repo and applying @cc-matthias-m PR on top of it (so we can use it in our app)

Depending upon the original creator we might continue work on that (https://github.com/Volksverpetzer/react-native-hyperlink) or (if they want) take over this repo.

Any thoughts or comments to this?

rejas avatar Nov 11 '25 07:11 rejas

I am not sure if @obipawan still is interested in maintaining this repo (or has the time), although we and lots others find it helpful. So first: thanks to them for this library!

I took the liberty of forking this repo and applying @cc-matthias-m PR on top of it (so we can use it in our app)

Depending upon the original creator we might continue work on that (https://github.com/Volksverpetzer/react-native-hyperlink) or (if they want) take over this repo.

Any thoughts or comments to this?

That sounds good. Since we haven't heard from the creator in over a year, we can create a new repository to maintain this package.

The first person who has time should:

  • Create a new repository
  • Update the README:
    • Explain the situation and indicate that this is the new maintained repository for the package
    • Update the "Installation" section to reflect the new package name
  • Publish the package on npm

Thanks to whoever takes this on!

cc-matthias-m avatar Nov 12 '25 08:11 cc-matthias-m

We at Volksverpetzer would be happy to maintain this, the repo is already forked and available at https://github.com/Volksverpetzer/react-native-hyperlink

Big question to start with though: What name should the new fork have to distunguish itself in npm etc? Any ideas from you @cc-matthias-m ?

We could scope this with our name like @volksverpetzer/react-native-hyperlink or @vvp/react-native-hyperlink...

rejas avatar Nov 12 '25 09:11 rejas

Generally, the convention is to prefix the package name with the author/company name.

So @volksverpetzer/react-native-hyperlink is a good solution.

cc-matthias-m avatar Nov 12 '25 11:11 cc-matthias-m

Generally, the convention is to prefix the package name with the author/company name.

So @volksverpetzer/react-native-hyperlink is a good solution.

I just published v0.0.23 under https://www.npmjs.com/package/@volksverpetzer/react-native-hyperlink

rejas avatar Nov 15 '25 10:11 rejas

hey @cc-matthias-m @rejas

I had to take a long hiatus on my open source projects. I took sometime to upgrade to the latest versions of react-native, react, mdurl, linkifyit, builder-bob, among others. I think this was long overdue.

I truly appreciate the PR even though I haven’t been around to merge this, hopefully the latest changes will help.

I’ll be creating a patch 0.1.0 in a bit, and would be glad to take inputs / PRs on this. In the meanwhile @rejas's package @volksverpetzer/react-native-hyperlink should work as an alternative for 0.0.23

Thanks for all your support @cc-matthias-m @rejas

obipawan avatar Nov 18 '25 05:11 obipawan

Patch 0.1.0 should be available now, please let me know if this has any issues. I've added tests, so should be fine. Thanks again

obipawan avatar Nov 18 '25 05:11 obipawan

Hi,

I tried with the patch 0.1.0 and all work as expected.

Thanks

cc-matthias-m avatar Nov 18 '25 09:11 cc-matthias-m