JSON API 데이터 사용하기 (JSONPlaceholder) 기본 URL 변수 생성 const BASE_URL = 'https://jsonplaceholder.typicode.com'; 가져올 데이터의 json 형식에 맞추어 type생성 type Photo = { albumId: number; id: number; title: string; url: string; thumnailUrl: string; }; 데이터를 넣을 변수와 setter 생성 (useState 사용) const [photos, setPhotos] = useState([]); 데이터 가져오는 함수 생성 function에 async 넣기 fetch() 사용하여 데이터를 가져올 url 작성 후, fetch 앞에 await 작성하여 변수 ..