obipawan / react-native-hyperlink

A <Hyperlink /> component for react-native that makes urls, fuzzy links, emails etc clickable
MIT License
801 stars 76 forks source link

Throwing error with react-native 0.69.3 #67

Closed ursnj closed 2 years ago

ursnj commented 2 years ago

Describe the bug

Warning: Failed prop type: Hyperlink: prop type linkStyle is invalid; it must be a function, usually from the prop-types package, but received undefined.This often happens because of typos such as PropTypes.function instead of PropTypes.func. at Hyperlink (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=njsolutions.watchpartys&modulesOnly=false&runModule=true:216800:22)

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

adamblvck commented 2 years ago

I'm experiencing exactly the same error, now running on Expo SDK 46 (react-native@0.69.4)

karanmartian commented 2 years ago

when will a release be made with the fix? looks like the PR is already done

ursnj commented 2 years ago

I dont think this is active , so i ahve fixed it in react-native-linkify library

karanmartian commented 2 years ago

@ursnj could you share the link to this library? cant find it - react-native-linkify

ursnj commented 2 years ago

https://www.npmjs.com/package/react-native-linkify

karanmartian commented 2 years ago

@ursnj you are still using const textPropTypes = Text.propTypes || {} in that source at the new repo if I am not mistaken. This would throw the same error. It should be TextPropTypes right?

tomwaitforitmy commented 2 years ago

@karanmartian did you try @ursnj's package? Solved the issue for me πŸ‘Œ. It would prefer a fix to this repo here, but if it is not active what can we do?

obipawan commented 2 years ago

hey folks, fixed in 0.0.21. Let me know if this works.

sandergo90 commented 2 years ago

@obipawan this new release is giving typescript issues.

import Hyperlink JSX element type 'Hyperlink' does not have any construct or call signatures.

obipawan commented 2 years ago

Oh crap i messed up the export! I'll fix this in an hour, I'm outside without my machine. In the meanwhile you can import {Hyperlink} from 'react-native-hyperlink'.

obipawan commented 2 years ago

@sandergo90 updated with v0.0.22. Hope this works 🀞

sandergo90 commented 2 years ago

Works like a charm, thanks πŸ‘Œ