Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Does$state.snapshot create a deep clone?#16186

AnsweredbywebJose
nasheomirro asked this question inQ&A
Discussion options

With some quick testing it does seem to do so but I'm confused at this quotefrom the docs:

This is handy when you want to pass some state to an external library or API that doesn’t expect a proxy, such asstructuredClone.

If it already does deep clone the object, then why would you want to pass a snapshot tostructuredClone? Or is it more likestructuredClone is just an example for an API that doesn't expect a proxy? I don't know if I'm missing something here.

You must be logged in to vote

As seen in#12413,$state.snapshot() was moved early on to usestructuredClone().

Replies: 1 comment

Comment options

As seen in#12413,$state.snapshot() was moved early on to usestructuredClone().

You must be logged in to vote
0 replies
Answer selected bynasheomirro
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@nasheomirro@webJose

[8]ページ先頭

©2009-2025 Movatter.jp