import { Suspense } from 'react'
import { api } from 'convex/_generated'
import { useQuerySuspense } from './useQuerySuspense'

function App() {
  return (
    <Suspense fallback="Loading...">
      <TodoList />
    </Suspense>
  )
}

function TodoList() {
  const todos = useQuerySuspense(api.todos.list)
  // render todos
}
