-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(remix-dev/vite): use structuredClone
instead of JSON.parse(JSON.stringify())
#9968
base: dev
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 36a7de8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
structuredClone
instead of JSON.parse(JSON.stringify())
2d0dec7
to
6351936
Compare
@MichaelDeBoey Thanks for review, fixed |
@MichaelDeBoey Thanks for approve |
@MichaelDeBoey Can we merge that one? |
@brophdawg11 I changed it to what you suggested |
081b287
to
36a7de8
Compare
JSON.parse(JSON.stringify(
is not a recommended method for doing deepCopy. I suggest changing it to native structuredClonehttps://developer.mozilla.org/en-US/docs/Web/API/structuredClone
https://web.dev/articles/structured-clone
Benchmarks
https://jsperf.app/watawu
Support
https://caniuse.com/?search=structuredClone
Testing Strategy:
Called function directly