API
-
오류 정의되지 않은 속성없이 React Native에서 API의 데이터를 표시하는 방법은 무엇입니까?카테고리 없음 2020. 8. 15. 14:19
질문 표시 할 때 dataSource [0] .first_name을 사용할 때 항상 정의되지 않은 속성 오류가 발생합니다. export default class Profile extends React.Component { constructor(props) { super(props) this.state = { dataSource: [] } } async componentDidMount() { const response = await fetch('http://api url goes here /api/v1/getUserInfo/40', { method: 'GET', headers: { 'authorization': 'token ' + global.storeToken, } }) .then((response) =..