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

Support React 16 #972

Closed
ghost opened this issue Jul 27, 2017 · 13 comments
Closed

Support React 16 #972

ghost opened this issue Jul 27, 2017 · 13 comments

Comments

@ghost
Copy link

ghost commented Jul 27, 2017

Datepicker is not working with React 16.0.0 Beta 1. I was getting errors on PropTypes in the react-datepicker.min.js file.

@martijnrusschen
Copy link
Member

Can you be more specific and post the errors here?

@ghost
Copy link
Author

ghost commented Jul 28, 2017

Figure out it was a webpack include issue with an older version.

@ghost ghost closed this as completed Jul 28, 2017
@alex-shamshurin
Copy link
Contributor

We must update proptypes package:

import React from 'react'
import PropTypes from 'prop-types'

@rafeememon
Copy link
Contributor

I think this is going to be trickier than just updating the proptypes package. React is declared as a peer dependency supporting two different major versions (0.x and 15.x). Ideally, the package versions of react and prop-types should match. I'm not exactly sure if there's some dependency combination that ensures that. I'm reopening this issue so that we can figure out a solution.

@rafeememon rafeememon reopened this Jul 28, 2017
@rafeememon rafeememon changed the title React 16.0.0 beta 1 Support React 16 Jul 28, 2017
@aij
Copy link
Contributor

aij commented Jul 28, 2017

FWIW, We're currently on React 15.1.0, which doesn't use the prop-types package. The only harm in using components that use the prop-types package seems to be that we get deprecation warnings about how calling prop types directly is not supported. (They're somewhat misleading in that they blame the render method of a component rather than blaming React itself for the deprecated invocation.)

I do not know how it interacts with 0.14.

Do we actually support 0.14? The README would appear to indicate 15.5 is required for newer versions of react-datepicker, though package.json still says ^0.14.0 || ^15.0.0.

@dimitropoulos
Copy link

dimitropoulos commented Sep 26, 2017

for notoriety of the impact of this issue: +1 (emoticon) if this is preventing you from using React 16 (now that it's released)

@ghost
Copy link
Author

ghost commented Sep 29, 2017

Any workaround to make it work with react 16? This is the only incompatible library that I have in my dependencies

@bjankord
Copy link

bjankord commented Oct 4, 2017

There is an open PR to add compatibility with react v16 here: #1047 @martijnrusschen @rafeememon would you have some time to take a look?

@jeffijoe
Copy link

I'm also having issues with React 16:

image

@rufman
Copy link
Contributor

rufman commented Oct 23, 2017

Looks like floating-ui/react-popper#59 is merged, so updating to the latest version will resolve the issue.

@pawarvijay
Copy link

Still Its giving error with react 16 , am i missing anything

toms-Macbook:~ tom$ cd fireworks/
toms-Macbook:fireworks tom$ clear
toms-Macbook:fireworks tom$ mkdir myproject
toms-Macbook:fireworks tom$ cd myproject/
toms-Macbook:myproject tom$ npm init -y
toms-Macbook:myproject tom$ npm install react react-dom react-datepicker --save
myproject@1.0.0 /Users/tom/fireworks/myproject
├─┬ react@16.0.0
│ ├─┬ fbjs@0.8.16
│ │ ├── core-js@1.2.7
│ │ ├─┬ isomorphic-fetch@2.2.1
│ │ │ ├─┬ node-fetch@1.7.3
│ │ │ │ ├─┬ encoding@0.1.12
│ │ │ │ │ └── iconv-lite@0.4.19
│ │ │ │ └── is-stream@1.1.0
│ │ │ └── whatwg-fetch@2.0.3
│ │ ├─┬ promise@7.3.1
│ │ │ └── asap@2.0.6
│ │ ├── setimmediate@1.0.5
│ │ └── ua-parser-js@0.7.17
│ ├─┬ loose-envify@1.3.1
│ │ └── js-tokens@3.0.2
│ ├── object-assign@4.1.1
│ └── prop-types@15.6.0
├─┬ react-datepicker@0.57.0
│ ├── classnames@2.2.5
│ ├── moment@2.19.1
│ ├── *UNMET PEER DEPENDENCY react@^15.5.x
│ ├── UNMET PEER DEPENDENCY react-dom@^15.5.x
│ ├── react-onclickoutside@6.0.0
│ └─┬ react-popper@0.7.4
│   └── popper.js@1.12.6
└── react-dom@16.0.0

npm WARN react-onclickoutside@6.0.0 requires a peer of react@^15.5.x but none was installed.
npm WARN react-onclickoutside@6.0.0 requires a peer of react-dom@^15.5.x but none was installed.
npm WARN myproject@1.0.0 No description
npm WARN myproject@1.0.0 No repository field.

@bjankord
Copy link

@martijnrusschen Can we get a release for this published out to npm?

@martijnrusschen
Copy link
Member

Done.

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

9 participants