Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling PropTypes validators directly is not supported by the prop-types package. #39

Closed
robertftw opened this issue Jun 7, 2017 · 7 comments

Comments

@robertftw
Copy link

Gertting this error in console with Linkify:

Warning: Failed propType: Calling PropTypes validators directly is not supported by the prop-types package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types Check the render method of Readmore.

My code:
<div className="col-12 col-9-tablet col-8-hd center-element no-padding"> <Linkify properties={{target: '_blank'}}> <p>{'Lorem ipsum dolor sit amet, postea scripta accusam in vel, duo at eros simul appareat, nam ei accusam adipisci reformidans. Duo fabulas moderatius contentiones in, cu vis duis oportere. Eum paulo assentior et. Semper integre ei quo, ius et semper vidisse tibique.Dicta perpetua gloriatur has et, te nostro electram efficiantur eum. Ius minim causae honestatis an, nam id vide duis probo, congue libris cu eos. No usu habeo forensibus, at nam evertitur torquatos. Moderatius accommodare ad nec. Essent apeirian eu vix, ne everti civibus salutatus vix. Ea eros ferri est, sit aliquando contentiones cu. http://google.com'}</p> </Linkify> </div>

However it works but the console error is annoying.

@pablolmiranda
Copy link

Could you please provide a github repo that reproduces the issue?

@ledhed2222
Copy link

same here - react 0.14.3 and linkify 0.2.1. will try to reproduce when i have a second

@pablolmiranda
Copy link

You can try to use codesandbox.io if it helps

@ledhed2222
Copy link

Guau, qué herramienta impresionante Pablo!

Anyway yes, I could easily recreate this. I thought it might have had to do with using the properties prop of Linkify but it doesn't seem so.

https://codesandbox.io/s/66x8qk4ER?module=%2FHello.js

@robertftw
Copy link
Author

@robertftw robertftw reopened this Aug 10, 2017
@pablolmiranda
Copy link

pablolmiranda commented Aug 10, 2017

@ledhed2222 @robertftw, found the issue.
The problem here is the prop-types module, that react-linkify uses, is not build to work with a React <= 15.5.0.
To not see this error anymore you need to update your React to version >= 15.5.0.

This actually has 0 impact over the module usage, the only issue will be the message on a dev environment. Since React doesn't check propTypes on a prod environment there is no user impact.

I will recommend go ahead and close this issue, it is a won't fix.

@tasti tasti mentioned this issue Jan 6, 2018
16 tasks
@tasti
Copy link
Owner

tasti commented Jan 7, 2018

Solution provided above, but in addition, prop-types will no longer be used in favor of flowtype in v1.0.0.

@tasti tasti closed this as completed Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants