react-native-hyperlink
react-native-hyperlink copied to clipboard
Throwing error with react-native 0.69.3
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:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- 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):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
I'm experiencing exactly the same error, now running on Expo SDK 46 ([email protected]
)
when will a release be made with the fix? looks like the PR is already done
I dont think this is active , so i ahve fixed it in react-native-linkify library
@ursnj could you share the link to this library? cant find it - react-native-linkify
https://www.npmjs.com/package/react-native-linkify
@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?
@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?
hey folks, fixed in 0.0.21. Let me know if this works.
@obipawan this new release is giving typescript issues.
import Hyperlink JSX element type 'Hyperlink' does not have any construct or call signatures
.
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'.
@sandergo90 updated with v0.0.22. Hope this works 🤞
Works like a charm, thanks 👌