react-native-off-canvas-menu icon indicating copy to clipboard operation
react-native-off-canvas-menu copied to clipboard

undefined is not an object (evaluating '_react3.default.PropTypes.bool')

Open phatnguyenbg opened this issue 8 years ago • 8 comments

undefined is not an object (evaluating '_react3.default.PropTypes.bool') How can i fix it? When I check import { OffCanvasReveal } from "react-native-off-canvas-menu"; OffCanvasReveal or OffCanvas3D it fails to me

phatnguyenbg avatar Nov 06 '17 16:11 phatnguyenbg

Go to "node-modules/react-native-off-canvas-menu" open offcanvas3d.js and offcanvasReveal.js add import PropTypes from 'prop-types' and change React.PropTypes to PropTypes on bouth

macanhajc avatar Nov 08 '17 18:11 macanhajc

Please open offcanvas3d.js and offcanvasReveal.js and change image into image

hanxf3 avatar Dec 21 '17 07:12 hanxf3

i tried that options and the error still happen

Drakezair avatar Dec 24 '17 02:12 Drakezair

You can try my method.The component has other problems.For example,it will come back when you touch any position on the screen .

hanxf3 avatar Dec 24 '17 06:12 hanxf3

i ready tried and return this captura de pantalla 25

pls help

Drakezair avatar Dec 27 '17 03:12 Drakezair

是原组件的代码有问题,offcanvas3d.js要修改,offcanvas.js同理

hanxf3 avatar Dec 27 '17 04:12 hanxf3

Also seeing this - latest version on a brand new app.

mcblum avatar Mar 24 '18 01:03 mcblum

Modify both files

//OffCanvasReveal.js
import PropTypes from 'prop-types'

OffCanvasReveal.propTypes = {
  active: PropTypes.bool.isRequired,
  onMenuPress: PropTypes.func.isRequired,
  menuItems: PropTypes.array.isRequired,
  backgroundColor: PropTypes.string,
  menuTextStyles: PropTypes.object,
  handleBackPress: PropTypes.bool
}
//OffCanvas3D.js
import PropTypes from 'prop-types'

OffCanvas3D.propTypes = {
  active: PropTypes.bool.isRequired,
  onMenuPress: PropTypes.func.isRequired,
  menuItems: PropTypes.array.isRequired,
  backgroundColor: PropTypes.string,
  menuTextStyles: PropTypes.object,
  handleBackPress: PropTypes.bool
}

vickvasquez avatar Apr 14 '18 12:04 vickvasquez