Uncaught TypeError: Cannot read properties of undefined (reading 'runtime')
이 오류는 값이 정의되지 않아 읽을 수 없을 때 발생한다.
나 같은 경우, detail 페이지에서 data가 들어오기 전의 movie state은 undefined 이기 때문이었던 듯.
나의 경우,
const [movie, setMovie] = useState()
이랬던 상황이다. react는 비어있는 state에 data가 들어오기 전이면 undefined을 반환한다. 그러나, useState()의 초기값으로 들어올 데이터의 타입을 명시해주면
undefined를 반환하지 않는다.
movie에 들어올 data는 객체이므로 중괄호를 초기값으로 넣어준다.
const [movie, setMovie] = useState({})
에러 해결.