ReactInlineEdit icon indicating copy to clipboard operation
ReactInlineEdit copied to clipboard

TypeError: Cannot read property 'string' of undefined

Open pratik14 opened this issue 6 years ago • 4 comments

Support for React 16. Proptype is deprecated I think we need to add prop-types library instead

pratik14 avatar Jan 11 '18 14:01 pratik14

Hi I ran into this issue to. Has there been a fix yet?

benji011 avatar Feb 20 '18 08:02 benji011

Hi,

Error is coming from here:

	InlineEdit.propTypes = {
	    text: _react2.default.PropTypes.string.isRequired,
	    paramName: _react2.default.PropTypes.string.isRequired,

where PropTypes of string is undefined. Is there a workaround?

benji011 avatar Feb 21 '18 07:02 benji011

@benji011 checkout this PR(https://github.com/kaivi/ReactInlineEdit/pull/41). He has made necessary changes. Fork the project and add those changes to use.

pratik14 avatar Feb 21 '18 07:02 pratik14

This is because proptypes is no longer a part of react as at v16. The project should npm i react-proptypes and use that instead.

iyobo avatar Jul 01 '18 09:07 iyobo