mzabriskie/react-disqus-thread

Unknown props warning with React 15.2.0

Opened this issue ยท 18 comments

Warning: Unknown props `shortname`, `identifier`, `category_id`, `url`, `onNewComment` on <div> tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
    in div (created by DisqusThread)

Can confirm this error. It looks like the props for the ReactDisqusThread are getting copied onto the child <div> and this is creating validation errors.

Have the same error

+1

+1

You can use my fork here until this original package gets updated.

@theplatapi that fork works great, thank you!

crw commented

@theplatapi Perhaps this is a new issue, I am receiving the following two warnings with your fork:

Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.

Warning: DisqusThread: React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement.

This is, obviously, because your code is using React.createclass and React.PropTypes. Should be an easy fix, I can submit a pull request in a bit. I just wanted to check that this was in fact a new issue with later releases of react and not a mistake on my end. Thanks!

@crw Feel free to submit a merge request to my repo.

crw commented

@theplatapi Thanks! I think I got too cocky there, it is turning out to be a bit more complicated than I initially figured. I may put up with the warnings for now.

@crw @theplatapi I'll have a look at refactoring out the React.createClass jazz shortly.