Skip to content

Fix: Accessing PropTypes via React package is deprecated#191

Closed
muralikrishna8 wants to merge 14 commits intozenoamaro:masterfrom
muralikrishna8:master
Closed

Fix: Accessing PropTypes via React package is deprecated#191
muralikrishna8 wants to merge 14 commits intozenoamaro:masterfrom
muralikrishna8:master

Conversation

@muralikrishna8
Copy link
Copy Markdown

When using the React-^15.3.2 version it is giving a warning message.

screen shot 2017-04-17 at 10 08 53 pm

Added prop-types package and accessing the PropTypes from this package.

@zenoamaro
Copy link
Copy Markdown
Owner

Thanks a lot for the contribution. We're in feature freeze at the moment, but we are definitely considering this for next release.

@muralikrishna8
Copy link
Copy Markdown
Author

Thanks 👍

@btoueg
Copy link
Copy Markdown

btoueg commented May 12, 2017

@muralikrishna8
Copy link
Copy Markdown
Author

@btoueg I've changed that file.

@btoueg
Copy link
Copy Markdown

btoueg commented May 24, 2017

@zenoamaro any chance this can be merged in the near future? It's a fairly innocuous change and would help our team upgrade to react 15.5. Thanks!

@alexkrolick alexkrolick changed the title Fix: Accessing PropTypes via React package is depricated Fix: Accessing PropTypes via React package is deprecated May 25, 2017
@alexkrolick
Copy link
Copy Markdown
Collaborator

@zenoamaro Do you think we should migrate to create-react-class and prop-types for 1.0.0 given the timing?

For everyone else:

  • This is just a deprecation warning; the API is still there until React 16. I understand some CI systems complain about any console.error, but if that is not a constraint you can still upgrade.
  • The reason we are holding back for now (pending discussion) is to avoid introducing a hard dependency that would normally be satisfied by a peer dependency (React > 0.14).

@Hillgren
Copy link
Copy Markdown

'We're in feature freeze at the moment'

When do you think the next release will be? :)

@alexkrolick
Copy link
Copy Markdown
Collaborator

@alexkrolick alexkrolick mentioned this pull request Jun 6, 2017
@alexkrolick
Copy link
Copy Markdown
Collaborator

We can work on this after #212. Thanks for your patience!

@mikecousins
Copy link
Copy Markdown
Contributor

mikecousins commented Jun 29, 2017

Nice work on the v1 release guys! Can we get this one in now?

Copy link
Copy Markdown
Collaborator

@alexkrolick alexkrolick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. Based on the usage docs for prop-types there are a few changes needed:

alexkrolick and others added 11 commits July 9, 2017 18:25
- Quill now has class-based Parchment formats
- fixes #216
- in npm5 prepublish is deprecated in favor of prepack
- http://blog.npmjs.org/post/161081169345/v500
- Update changelog
- Update contributors list
- Add FAQ to GH issue template
- Add example code for accessing Quill instance
- Add React 16 compatibility to roadmap

Thanks to everyone who contributed to v1.0.0!
@muralikrishna8
Copy link
Copy Markdown
Author

The custom validators that depend on PropTypes must be updated to use the new module: https://github.com/zenoamaro/react-quill/blob/master/src/component.js#L88

I think React.children.only will give the only child it has, otherwise it'll throw an error. In this case if we have children then only we are verifying it should have only one child and it should not be a textarea. So this doesn't change with the PropTypes I guess.
Correct me if my understanding is wrong.

@alexkrolick
Copy link
Copy Markdown
Collaborator

Thanks for the contribution. Based on the usage docs for prop-types there are a few changes needed:

@haxxxton
Copy link
Copy Markdown

haxxxton commented Jul 13, 2017

@muralikrishna8, would you mind also fixing the

Accessing factories like React.DOM.div has been deprecated and will be removed in v16.0+. Use the react-dom-factories package instead.  Version 1.0 provides a drop-in replacement. For more info, see https://fb.me/react-dom-factories

warning with this PR too?

I understand that the PR was originally specifically for PropTypes on React package, but it looks like you've put a lot of extra work in, so what's one more thing right ;)?

@alexkrolick
Copy link
Copy Markdown
Collaborator

alexkrolick commented Jul 30, 2017

Closing in favor of #242 which incorporates these changes as well as @haxxxton's suggestion.

Thanks!

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

Successfully merging this pull request may close these issues.

7 participants