Closed iam4x closed 1 year ago
import {createExchange} from 'foo'; const exchange = createExchange(); // exchange.store is a Proxy object from valtio/vanilla const Component = () => { const snap = useSnapshot(exchange.store); return (<div>{snap.foo}</div>); }
This doesn't work and throws:
TypeError: proxyState is not iterable
I've logged: console.log(Object.getOwnPropertyDescriptors(exchange.store)) which outputs:
console.log(Object.getOwnPropertyDescriptors(exchange.store))
proxy()
valtio
valtio/vanilla
Do you have an idea?
Still debugging, it looks like its importing .mjs and .js packages:
So proxyStateMap is correctly set in one context but not the other
proxyStateMap
Summary
This doesn't work and throws:
I've logged:
console.log(Object.getOwnPropertyDescriptors(exchange.store))
which outputs:proxy()
fromvaltio
instead ofvaltio/vanilla
Do you have an idea?