반응형
state = {
v: ""
};
_changeText = v => {
this.setState({ v });
};
clear = () => {
this.textInputRef.clear();
}
render() {
return (
<TextInput
ref={ref => this.textInputRef = ref}
value={this.state.v}
onChangeText={this._changeText}
/>
</View>
);
}
반응형
'Frontend > React & React.Native &Next.js' 카테고리의 다른 글
SetState 비동기 처리 (모달창에 Img 불러올때) (0) | 2021.10.07 |
---|---|
리액트 함수 컴포넌트 스닛펫 단축키 (0) | 2021.09.27 |
React Native)리액트 네이티브 자동 하이픈 기능 (핸드폰 번호) (0) | 2021.07.15 |
React Native)입력이 끝나고 실행하는 함수 onEndEditing (0) | 2021.07.14 |
React Native)expo로 splah screen 쉽게 만들기 (0) | 2021.07.14 |