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

use proptypes from standalone package #1540

Closed
macrozone opened this issue Jul 28, 2017 · 7 comments
Closed

use proptypes from standalone package #1540

macrozone opened this issue Jul 28, 2017 · 7 comments

Comments

@macrozone
Copy link
Contributor

storybook-native still uses import React, { Component, PropTypes } from 'react';

which does not work anymore in react 16.0.0.beta.x

it should use package prop-types

@atticoos
Copy link
Member

atticoos commented Aug 2, 2017

Given that we don't specify a react dependency version, I'd like to look towards @kentcdodds's solution for this glamorous, paypal/glamorous@14970c1.

Essentially - use prop-types if they exist and React is of a certain version, otherwise use React.PropTypes.

I think the right move is to continue to be flexible with the React version, since as a tool, we don't necessarily want to enforce requirements onto the projects using the tool.

@macrozone
Copy link
Contributor Author

@ajwhite that's true, but i want to highlight that the prop-types package work with react 14, 15 and 16: https://www.npmjs.com/package/prop-types

@Hypnosphi
Copy link
Member

Hypnosphi commented Aug 4, 2017

React.version.slice(0, 4) === '15.5'

Looks like this will warn in 15.6 and break in 16

@shilman
Copy link
Member

shilman commented Aug 4, 2017

@ajwhite why complicate things? Shouldn't we just move to prop-types and be done with it?

@atticoos
Copy link
Member

atticoos commented Aug 4, 2017

but i want to highlight that the prop-types package work with react 14, 15 and 16

Given @macrozone's findings -- sounds like we can move over without a problem on the compatibility fronts 👍

@kentcdodds
Copy link
Contributor

FWIW, I've considered moving glamorous to just use prop-types...

@danielduan
Copy link
Member

#1674 we've moved everything over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants