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

fix(*): import PropTypes from prop-types #395

Merged
merged 2 commits into from
May 14, 2017

Conversation

apaatsio
Copy link
Contributor

Using the PropTypes via the react package is deprecated as of React
15.5.0.

Use the PropTypes from the prop-types package as recommended.

See https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html

@eddywashere
Copy link
Member

Awesome! will check this out later

@julien-f
Copy link

@virgofx
Copy link
Collaborator

virgofx commented Apr 13, 2017

Bump the dependency to minimum of 15.5.7 per guides or better yet even 15.5.8 was released yesterday.

@ufocoder
Copy link

ufocoder commented Apr 14, 2017

@apaatsio By the way you can destruct types like the following:

import {string, bool} from 'prop-types';
  		  
const propTypes = {
   color: string,
   pill: bool
}

@apaatsio apaatsio force-pushed the prop-types branch 2 times, most recently from 515f440 to 3cd5085 Compare April 16, 2017 07:51
@apaatsio
Copy link
Contributor Author

I updated the dependencies to follow the instructions at https://github.com/reactjs/prop-types#how-to-depend-on-this-package. Thanks @julien-f

@ufocoder, I can see some benefits in readability but I'm not gonna go for that search-and-replace exercise. If someone wants to do it, go ahead.

@apaatsio
Copy link
Contributor Author

In the peer dependencies we still have "react": "^0.14.0 || ^15.0.0". I'm not confident at all that this will work with such old versions of React. When was the last time someone tested reactstrap with React 0.14.0??

@TheSharpieOne
Copy link
Member

TheSharpieOne commented Apr 17, 2017

reactstrap doesn't do complex things and for the more complex things, the API has been in react since 0.14.0, I would be surprised it didn't work with 0.14.0. prop-types on the other hand does not work with 0.14.0, the minimum version is 0.14.9. I would suggest changing the peerDep to "react": "^0.14.9 || ^15.3.0". If someone uses an older version, they will get a warning during npm install (unmeet peer dependency), but it will still allow them to build and use reactstrap. They will also get warning from react as mentioned in the prop-types docs.

Using the PropTypes via the react package is deprecated as of React
15.5.0.

Use the PropTypes from the prop-types package as recommended.

See https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html
@apaatsio
Copy link
Contributor Author

@TheSharpieOne Thanks, I updated the dependencies.

@nathancahill
Copy link
Contributor

While we're doing this, we should also update from react-addons-transition-group and react-addons-css-transition-group to reactjs/react-transition-group. See note here: https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#discontinuing-support-for-react-addons

@nathancahill
Copy link
Contributor

Nevermind, just saw #399 which is open for this.

@HaNdTriX
Copy link

HaNdTriX commented Apr 26, 2017

What's missing? May I help?

@eddywashere can you merge this PR?

@eddywashere
Copy link
Member

Thanks @apaatsio!

@eddywashere eddywashere merged commit 9080217 into reactstrap:master May 14, 2017
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.

None yet

8 participants