SolidJSS
SolidJSโ€ข16mo agoโ€ข
5 replies
Eve

unwrap doesn't seem to do anything

I'm trying to get a plain object, because seroval chokes at trying to serialize a store directly. But unwrap still returns a proxy.
function App() {
  const [people, setPeople] = createStore<any[]>([]);
  createEffect(() => {
    const ppl = unwrap(people);
    console.log('store: ', people)
    console.log('unwrap: ',ppl) 
    console.log('JSON: ', JSON.parse(JSON.stringify(people)));
  })
  return (<></>);
}

https://playground.solidjs.com/anonymous/351edceb-6107-4f57-81fa-6e2363ed1bf3
image.png
Quickly discover what the solid compiler will generate from your JSX template
Was this page helpful?