pmndrs / valtio

🧙 Valtio makes proxy-state simple for React and Vanilla
https://valtio.dev
MIT License
9.15k stars 257 forks source link

Doc typo? #21

Closed AjaxSolutions closed 4 years ago

AjaxSolutions commented 4 years ago

const state = create({ post: fetch(url).then((res) => res.json()) })

Should the state object be wrapped in proxy instead of create?

Aslemammad commented 4 years ago

Where is that typo exactly?

AjaxSolutions commented 4 years ago

Here is a direct link:

https://github.com/pmndrs/valtio#suspense-out-of-the-box

Search for:

Suspense out of the box
const state = create({ post: fetch(url).then((res) => res.json()) })
dai-shi commented 4 years ago

Nice catch! It's fixed.