react-native-checkboxlist
react-native-checkboxlist copied to clipboard
Super expression must either be null or a function, not undefined
Getting this error Super expression must either be null or a function, not undefined while using this library
+1
+1
+1
index.js at the head replace:import React, { Component } from 'react'; //import React from 'react-native'; import { Text, TouchableOpacity, View, Image, ListView, } from 'react-native'; import PropTypes from 'prop-types'; import BaseComponent from './BaseComponent' import Styles from './styles'
const propTypes = { options: PropTypes.array.isRequired, selectedOptions: PropTypes.array, maxSelectedOptions: PropTypes.number, onSelection: PropTypes.func, renderIndicator: PropTypes.func, renderSeparator: PropTypes.func, renderRow: PropTypes.func, renderText: PropTypes.func, //style: View.propTypes.style, //optionStyle: View.propTypes.style, disabled: PropTypes.bool };
Basecomment.js: import React, { Component } from 'react'; //import React from 'react-native';
export default class BaseComponent extends Component { _bind(...methods) { methods.forEach( (method) => this[method] = this[method].bind(this) ); } }
Now it can use!
+1