get-convex / convex-react-query

Apache License 2.0
6 stars 0 forks source link

Type Error when specifying initialData (and other options) #2

Closed thomasballinger closed 3 months ago

thomasballinger commented 3 months ago

Just adding initialData: [] causes a monster error in the example in this repo

function App() {
  const { data, error, isPending } = useQuery({
    // This query updates reactively.
    ...convexQuery(api.messages.list, {}),
    initialData: [],
  });

image

thomasballinger commented 3 months ago

Looks like the old method-based way still works. I think the standalone function can work, we've just typed it wrong. image

thomasballinger commented 3 months ago

fixed in 0.0.0-alpha.4