//react-native-ImagePicker 설치이후 진행
selectImage = async () => {
ImagePicker.launchImageLibrary(
{
mediaType: 'photo',
includeBase64: true,
maxHeight: 200,
maxWidth: 200,
},
(response) => {
console.log(response);
this.setState({ image: response });
},
)
}
/**
* Select video & store in state
*/
selectVideo = async () => {
ImagePicker.launchImageLibrary({ mediaType: 'video', includeBase64: true }, (response) => {
console.log(response);
this.setState({ video: response });
})
}
react-native-dotenv (env파일을 적용시켜보자) (2) | 2023.02.02 |
---|---|
react native scrollView vs flatList vs RecyclerListView vs flashList (0) | 2023.01.19 |
react native textinput에 height를 주었을때 글자 잘림 현상 (0) | 2023.01.19 |
react native ts config (0) | 2023.01.19 |
react-native styled components (feat: typescript) 설치 방법 (0) | 2023.01.19 |
댓글 영역