diff --git a/docs/basics/functional-programming-and-jotai.mdx b/docs/basics/functional-programming-and-jotai.mdx index 1078821470..f1e08485ef 100644 --- a/docs/basics/functional-programming-and-jotai.mdx +++ b/docs/basics/functional-programming-and-jotai.mdx @@ -23,12 +23,13 @@ const greetingAtom = atom((get) => { ``` Now, compare that code with `async`–`await`: + ```tsx const namePromise = Promise.resolve('Visitor') const countPromise = Promise.resolve(1) -const greetingPromise = (async function() { - const name = await namePromise; - const count = await countPromise; +const greetingPromise = (async function () { + const name = await namePromise + const count = await countPromise return (