useEffect(() => {
let 꺼낸거 = localStorage.getItem('watched');
꺼낸거 = JSON.parse(꺼낸거);
꺼낸거.push(FindProduct.id);
꺼낸거 = new Set(꺼낸거);
꺼낸거 = Array.from(꺼낸거);
localStorage.setItem('watched', JSON.stringify(꺼낸거));
}, []);
위 코드를 실행하면
Uncaught TypeError: Cannot read properties of undefined (reading 'parse')
라는 에러가 나옵니다. parse는 도대체 어떻게 읽게 할 수 있을까요?