Uncaught TypeError: Cannot read properties of undefined ๋น๋๊ธฐ๋ฅผ ์ด์ฉํ์๋ ๋ ๋๋ง ์์์ฐจ์ด์ ์ํด ์๊ธธ ์ ์๋ ์ค๋ฅ
ยท
๐ง Library/React JS
์ธ๊ธฐ์ํ ์ถ์ฒ ์ฌ์ดํธ๋ฅผ ๊ตฌํํ๋ค ๊ฐ๋จํด ๋ณด์ด์ง๋ง ํด๊ฒฐ๋์ง ์๋ ์ค๋ฅ๋ฅผ ๋ฐ๊ฒฌํ๋ค. ์ฌ๊ธฐ์๋ movie๋ผ๋ ํ๋กํผํฐ๋ฅผ ๋ฐ์ ์ ์๋ค๋๋ฐ ๊ทธ๋ด๋ฆฌ๊ฐ ์๋ค... ์ค๋ฅ ๋ถ๋ถ์ ์ฝ๋๋ฅผ ๋ณด์ import { useEffect, useState } from "react"; import { useParams } from "react-router-dom"; const Detail = () => { const [detail, setDetail] = useState({}); const { id } = useParams(); const getDetail = async () => { const json = await ( await fetch(`https://yts.mx/api/v2/movie_details.json?movie_id..