- Forums
- react
- React Javascript Fix: Uncaught Typeerror: Cyclic Object Value
This is how I was able to fix this error in react using useref [5324], Last Updated: Sun Aug 18, 2024
edw
Sun Aug 18, 2024
0 Comments
116 Visits
The Error:
Uncaught TypeError: cyclic object value
The Condition:
import { useParams } from "react-router";
const itemsRef = useRef({}); // empty object
{JSON.stringify(itemsRef, null, 2)} // ERROR WAS ON THIS LINE
The Solution:
CHANGE TO:
{JSON.stringify({Arr:itemsRef.Arr}, null, 2)}
Source:
/g/xampp8/htdocs/laravel/StudentTodo/ionic-rowley/ionic-rowleyV2/Mutlipication.tsx
Resource: https://stackoverflow.com/a/50967318