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

React 16 compatibility issues #18

Open
vivekiyer114 opened this issue Jan 21, 2018 · 6 comments
Open

React 16 compatibility issues #18

vivekiyer114 opened this issue Jan 21, 2018 · 6 comments

Comments

@vivekiyer114
Copy link

When i import FlipCard component, it gives the following warning:-

TypeError: Cannot read property 'string' of undefined


  64010 | displayName: 'ReactFlipCard',
  64011 | 
  64012 | propTypes: {
> 64013 |   type: _react.PropTypes.string,
        |                          ^  64014 |   flipped: _react.PropTypes.bool,
  64015 |   disabled: _react.PropTypes.bool,
  64016 |   onFlip: _react.PropTypes.func,
@BryanLong14
Copy link

Having the same problem. Let me know if you find a way to fix it!

@kennethormandy
Copy link

I think this mainly just stems from the PropTypes package having moved from being included with React v16, to its own package. You might be able to fix it just by installing React PropTypes:

npm install --save prop-types

Alternatively—because I had this same issue and some more specific styling constraints I needed to deal with—I put together a new react-flipcard component. It’s loosely based on this one, so the API is fairly similar. Demos are here.

You can install it with:

npm install --save @kennethormandy/react-flipcard

Hope either is helpful.

@medelman17
Copy link

Also did the same: https://www.npmjs.com/package/flexy-flipcards

@gurubagawan
Copy link

Anybody fix this?

@fernandopascoalbr
Copy link

@CindyOrtega416
Copy link

  1. Uninstall: npm unistall -S react-flipcard
  2. Execute command: npm install --save-dev react-flipcard-2
  3. Import the component: import Flipcard from "react-flipcard-2";

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

7 participants