Conversation
|
the spread operator won't work here since it only clones the top level keys |
|
maybe the code can be refactored to avoid cloning altogether. synchrony/src/transformers/simplify.ts Lines 225 to 231 in 721cf5d the only place where it might be necessary is related to control flow functions |
|
Pretty sure this one is better -native deep clone: |
immutable to deep clone using structuredClone
|
based on my tests structuredClone is a fair bit slower than json parse/stringify, but as long as it fixes the issue it shouldn't matter too much |
fix for #134
JSON.parse(JSON.stringify(item))have trouble on large object