i try to json strigify and parse after circular structure. I want to pass to all my website my variable socket when i use socket io. In React, it's easy but the project is old and they not use React for all the project.
I use flatted library, and it's work very good for stringify but i don't get my original element. When i parse it, i get an object
const mySocket = io("monsite:1234");
const stringigy = JSON.stringify(mySocket);
localStorage.setItem("io",mySocket);
don't work because circular structure.
With Flatted
const mySocket = io("monsite:1234");
const stringigy = Flatted.stringify(mySocket);
localStorage.setItem("io",mySocket);
work but when i parse, i don't get the original value
socket = Flatted.parse(getIo);
Thanks for help.
