QwikDev/qwik

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

genki opened this issue · 3 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 commented

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 you're talking about useStore value correct?