P
P
p4p2019-08-30 22:36:31
React Native
p4p, 2019-08-30 22:36:31

Listing an array how to do?

countryData = ["India", "Pakistan", "USA"];

    countryList = () => {
      return (this.countryData.map((x, i) => {
        return (<Picker.Item label={x} key={i} value={x} />)
      }));
    }

Why doesn't it work? Located in componentDidMount . Says countryList is not a function.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question