createServerFn
So what's the Tanstack way of doing this:
- upon clicking a button to create a new quiz > use convex's useMutation to create the quiz > call serverFn to set the quizId in the cookie, OR
- upon clicking a button to create a new quiz > call serverFn (with useServerFn) to create the quiz, with using a new ConvexHttpClient and IN the serverFn and set the cookie with the created quizId.
With the last approach convex doesn't seem to get the headers with the better-auth JWT, so in the convex functions, it error Not authenticated...
Perhaps I'm anti-patterning here... both all these packages seem very client-oriented.