panzacoder
CCConvex Community
•Created by LarryHopeCode on 3/6/2024 in #support-community
Deploy dev or preview to Vercel.
I think the Best Practices page is likely a good fit, I actually stumbled across it searching for
convex _generated git tracking
or something like that, so some SEO is already potentially pointing there38 replies
CCConvex Community
•Created by LarryHopeCode on 3/6/2024 in #support-community
Deploy dev or preview to Vercel.
@ian I was rebasing a long running branch I hadn’t touched in a bit, so it did wind up just being the version changes that were in conflict. Thanks all!
38 replies
CCConvex Community
•Created by LarryHopeCode on 3/6/2024 in #support-community
Deploy dev or preview to Vercel.
This is super old, but.. should we be? I didn't see this mentioned explicitly in a quick google search or a discord search.
I have been for a while, and am just resolving some conflicts while rebasing a branch, and it smelled like situations I've been in before where I was mistakenly checking something in that shouldn't be.
38 replies
CCConvex Community
•Created by panzacoder on 9/10/2024 in #support-community
Unable to pass Custom Queries to CRUD function.
For anyone finding this, should be addressed in convex-helpers
0.1.57
, which can be tested now at convex-helpers@0.1.57-alpha.1
today. Thanks @ian for the super quick fix!5 replies
CCConvex Community
•Created by panzacoder on 9/10/2024 in #support-community
Unable to pass Custom Queries to CRUD function.
I tried asking kapa.ai but the error message is too long for it to help 😦
5 replies
CCConvex Community
•Created by panzacoder on 9/10/2024 in #support-community
Unable to pass Custom Queries to CRUD function.
@Convex AI Helper Bot Any ideas?
5 replies
CCConvex Community
•Created by ibrahimyaacob on 6/10/2024 in #support-community
how to use getUserIdentity with fetchQuery (server component)
I re-use that function any time I need to fetch. You could also create a function that wraps
fetchQuery
for fetchAuthQuery
that injects the token9 replies
CCConvex Community
•Created by ibrahimyaacob on 6/10/2024 in #support-community
how to use getUserIdentity with fetchQuery (server component)
@hugo the token has to come from you auth provider.
When you are using
useQuery
convex automatically grabs it from the client, so you don't have to manually pass your token.
With fetchQuery
you have to manually pass the token prop. You can get this from your auth provider, in my case that's Clerk:
9 replies
CCConvex Community
•Created by panzacoder on 6/21/2024 in #general
Preloading queries caching
Yeah I'm actually excited to try this out the more I think about it. Glad you agree it's an interesting approach!
6 replies
CCConvex Community
•Created by panzacoder on 6/21/2024 in #general
Preloading queries caching
As I was going through this, I might experiment with something like a
fetchQuery
that utilizes the cache, and then a useQuery
variant that can register with convex to update values, and then will invalidate the RSC cache once the values diff. If I'm able to come up with anything I'll share it here for feedback.6 replies
CCConvex Community
•Created by panzacoder on 6/21/2024 in #general
Preloading queries caching
with useQuery
1. SSR happens for this route.
<ProfileBadge />
is a client component, so SSR doesn't included data fetching
2. Page loads, and assuming I have some pending UI, the pending UI is displayed.
3. useQuery
executes, and then replaces the pending UI.
4. When doing soft navigation, steps 2-3 are repeated.
PRO: Simple DX
CON: seo, jank
with preloadQuery
1. SSR happens for this route. <ProfileBadge />
is a RSC and fetches the data for this on the server, and the rest of the page is streamed in simultaneously.
2. Page begins to load, with the the suspense fallback in place for my <ProfileBadge />
3. <ProfileBadge />
finishes loading, gets to the client. usePreloadedQuery
is called and must resolve before data is shown (I think), unless preloadedQueryResult
is used to extract the value during RSC
4. When doing soft navigation, step 3 is repeated
PRO: seo
CON: DX, 2-hop requests every time
with fetchQuery & useQuery
1. SSR happens for this route. <ProfileBadge />
is a RSC and fetches the data for this on the server, and the rest of the page is streamed in simultaneously.
2. Page begins to load, with the the suspense fallback in place for my <ProfileBadge />
-- If cache exists, this is MUCH faster bc only 1-hop for the request
3. <ProfileBadge />
finishes loading, gets to the client. useQuery
is called after and can replace fetched data once it completes. No jank assuming cache is invalidated properly.
PRO: seo, DX (one fn call to use values during RSC instead of 2)
CON: DX, 1-hop requests with a properly managed cache.6 replies
CCConvex Community
•Created by panzacoder on 6/21/2024 in #general
Preloading queries caching
@Michal Srb I agree it's not really ideal, either way. Perhaps my question is better posed just as "what do you do" / "what do you recommend" as far as RSC goes.
Let's take a small example.
I have a page with some general content, and then I have my user's
<ProfileBadge />
in the top right corner, with a notification count. All the data needed can be found in one request, api.users.getMyUser
. Here is my understanding of render order for each of the options available to me, assuming that for each scenario I have added as much streaming/pending UI as possible (putting in a separate message for length limits)6 replies
CCConvex Community
•Created by Tanuj on 6/18/2024 in #show-and-tell
My Convex web app is working flawlessly offline! (I’m 40K ft in the sky)
Gosh that's the dream. I need to invest time in getting this working when I can. My last cross-country flight the wifi was out so I just had to watch a movie lol.
7 replies
CCConvex Community
•Created by panzacoder on 5/1/2024 in #general
Hello world! 👋
That is super helpful convex-context @Jamie !
I really like that approach and gives be a good framework to consider these approaches.
I still think your docs are very good, and actually this makes your methodology for creating new stuff super clear to me and increases my trust in the docs to know you have pipeline for new approaches graduating into the mainline.
Thank you!
8 replies