
앱을 혼자 다시 만들고 있는데 드롭다운 선택창을 만들고 싶어서
react-select를 이용하는데 자꾸 오류가 나옵니다
import React,{useState,useEffect} from "react";
import { View, StyleSheet, Image, TouchableOpacity,Text,TextInput , Button} from "react-native";
import Select from 'react-select';
export default function Change({navigation,route}){
const options = [
{ value: "apple", label: "Apple" },
{ value: "banana", label: "Banana" },
{ value: "orange", label: "Orange" },
];
const [number, onChangeNumber] = useState('');
const [selectedOption, setSelectedOption] = useState('');
useEffect(()=>{
navigation.setOptions({
title:'Simple Change by k',
})
},[])
return(
<View>
<Select
options={options}
value={selectedOption}
onChange={setSelectedOption} />
<TextInput
style={styles.input}
onChangeText={onChangeNumber}
placeholder="useless placeholder"
numberOfLines={1}
maxLength={15}
/>
<TouchableOpacity></TouchableOpacity>
</View>
)
}
const styles = StyleSheet.create({
input:{
marginTop: 20,
margin: 10,
paddingHorizontal: 10,
width:300,
height: 50,
borderRadius: 10,
borderColor: 'gray',
borderWidth: 2
},
button01:{
marginTop: 20,
margin: 10,
paddingHorizontal: 10,
width:300,
height: 50,
},
selectBox:{
fontSize: 14,
color: 'blue',
}
})

뭐가 문제일까요 ㅜ
