backpack1098B
Convex Communityโ€ข2y agoโ€ข
36 replies
backpack1098

suggestions on improving my architecture? (not really convex specific)

hello frontend / convex experts! i notice that im spamming my
getImages
query functions heavily due to my bad design. ๐Ÿ™ˆ

im building something like an album where users can upload images and save them to an album.

i have a next.js page that looks like the following and every time a user clicks on the next button, the 8 images uploaded will rerender again since everything here lives on the same page.tsx. im performing something like
useMutation(api.images.save)
when a user clicks on the "next" button and then they are redirected to a new album page
/album-page/2
with 8 images.

ideally, the 8 images should not rerender when redirected to the next page from
/album-page/1
to
/album-page/2
. any suggestion? ๐Ÿ™
image.png
Was this page helpful?