qwik icon indicating copy to clipboard operation
qwik copied to clipboard

[✨] Add the `unwrapProxy` as a Low-Level API

Open genki opened this issue 1 year ago • 4 comments

Is your feature request related to a problem?

As the proxy object is not cloneable, so for example, it is need to be serialized/deserialized to store into the indexedDB.

Describe the solution you'd like

If there is a way to get the target object of the proxy object as like as the Vue's toRaw, we can use it directly to store into the indexedDB.

Describe alternatives you've considered

ThegetProxyTarget function can also solve this problem.

Additional context

No response

genki avatar Apr 19 '24 06:04 genki

No one has this issue? If you want to save the state into the IndexedDB, this issue enforce us to serialize the object and lost its structure in the DB. I think it is necessary that the way to get the target object of the proxy in application layer.

genki avatar Apr 29 '24 06:04 genki

@genki you're talking about useStore value correct?

PatrickJS avatar May 01 '24 07:05 PatrickJS

@PatrickJS Yes. Here's the example. https://stackblitz.com/edit/qwik-starter-ekj4if?file=src%2Froutes%2Findex.tsx

genki avatar May 01 '24 15:05 genki

Should be fixed with #6960

GrandSchtroumpf avatar Oct 10 '24 08:10 GrandSchtroumpf