React-stripe-elements: React v16?

Created on 28 Sep 2017  路  5Comments  路  Source: stripe/react-stripe-elements

lowPriorityWarning.js:38 Warning: Accessing createClass via the main React package is deprecated, and will be removed in React v16.0. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class v15.* is available on npm as a temporary, drop-in replacement. For more info see https://fb.me/react-create-class

printWarning @ lowPriorityWarning.js:38
lowPriorityWarning @ lowPriorityWarning.js:57
get @ React.js:106
_interopRequireWildcard @ inject.js:23
./node_modules/react-stripe-elements/es/components/inject.js @ inject.js:15
__webpack_require__ @ bootstrap c067d89971746d3c0896:659
fn @ bootstrap c067d89971746d3c0896:85
./node_modules/react-stripe-elements/es/index.js @ index.js:12
__webpack_require__ @ bootstrap c067d89971746d3c0896:659
fn @ bootstrap c067d89971746d3c0896:85
./src/components/Subscription.js @ Spinner.js:7
__webpack_require__ @ bootstrap c067d89971746d3c0896:659
fn @ bootstrap c067d89971746d3c0896:85
./src/App.js @ xss-filters.js:1099
__webpack_require__ @ bootstrap c067d89971746d3c0896:659
fn @ bootstrap c067d89971746d3c0896:85
./src/index.js @ wordmark.svg:1
__webpack_require__ @ bootstrap c067d89971746d3c0896:659
fn @ bootstrap c067d89971746d3c0896:85
0 @ main.js:789
__webpack_require__ @ bootstrap c067d89971746d3c0896:659
(anonymous) @ bootstrap c067d89971746d3c0896:708
(anonymous) @ bundle.js:712

Most helpful comment

Hey @milesalex and @janiukjf! I'm sorry our code was triggering this strange warning message. The warning came about because of the way we were importing react in our code. It was fixed in https://github.com/stripe/react-stripe-elements/commit/e56c60f79acad05864fad321e3d91462a605f892 and should go away if you upgrade to the current version. Let me know if you're still having this problem!

All 5 comments

how about a PR?

Hehe I鈥檒l see what I can do! New to open source 馃檲

Hi! We haven't had a chance to look at React 16 yet but are very excited about it. I suspect this is a small change to dependency or the way we're importing something. We'll get back to you soon, but a PR is welcome!

I'm seeing this too. I'm definitely using React 15.x, but the warnings are annoying. Based on what I'm seeing in the code, nothing particularly looks like it should be throwing these warnings. PropTypes seems to be referenced properly and I don't see any references to React.createElement. I think it might be a transpiling thing in the webpack config, but I don't know webpack well enough to find it so far.

Hey @milesalex and @janiukjf! I'm sorry our code was triggering this strange warning message. The warning came about because of the way we were importing react in our code. It was fixed in https://github.com/stripe/react-stripe-elements/commit/e56c60f79acad05864fad321e3d91462a605f892 and should go away if you upgrade to the current version. Let me know if you're still having this problem!

Was this page helpful?
0 / 5 - 0 ratings