Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super expression must either be null or a function, not undefined #3

Open
priyankagupta23pg opened this issue Jun 18, 2018 · 7 comments

Comments

@priyankagupta23pg
Copy link

Getting this error Super expression must either be null or a function, not undefined
while using this library

@zaoqishibing
Copy link

+1

2 similar comments
@lhd951220
Copy link

+1

@wywzixin
Copy link

+1

@wm0425
Copy link

wm0425 commented Jul 2, 2019

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
};

@wm0425
Copy link

wm0425 commented Jul 2, 2019

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) );
}
}

@wm0425
Copy link

wm0425 commented Jul 2, 2019

Now it can use!

@NRD90M
Copy link

NRD90M commented Sep 5, 2019

+1

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

No branches or pull requests

6 participants