Hacker News new | past | comments | ask | show | jobs | submit login

For data to rendering on UI, JSON.parse(JSON.stringify()) is enough. For other operations, clone an object with such complex structure is not a good idea, you may change your way of coding.



Agreed, generally. But it may be nice for saving complicated game states, or sending complicated objects to a Worker without having to rebuild them from JSON.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: