Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead. #46

Open
epleaner opened this issue Jun 1, 2017 · 3 comments

Comments

@epleaner
Copy link

epleaner commented Jun 1, 2017

Even after updating to @3.0.1, we are still seeing deprecation warnings related to PropTypes. It seems like it is happening in the src for Portal. The compiled code looks like this:

var Portal = _react2.default.createClass({
	  ...
	  propTypes: {
	    /**
	     * A Node, Component instance, or function that returns either. The `container` will have the Portal children
	     * appended to it.
	     */
	    container: _react2.default.PropTypes.oneOfType([_componentOrElement2.default, _react2.default.PropTypes.func])
	  },
          ...
@kyleaa
Copy link

kyleaa commented Jun 7, 2017

This was fixed in #42 but hasn't been released to npm 😕 (see #43)

@tedeh
Copy link

tedeh commented Jun 22, 2017

You can put a git repository directly in your package.json like this:

"react-bootstrap-modal": "git+https://github.com/tedeh/react-bootstrap-modal.git#master"

Unfortunately #42 does not work because someone forgot to run npm run build before commiting.

@t0mtaylor
Copy link

I've merged my branch with the latest forks and ive resolved a sinon dep warning, and now the react prop-types warning is no more :)

git+https://github.com/t0mtaylor/react-bootstrap-modal.git#master

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

No branches or pull requests

4 participants