How do I best load my products?
# help-and-questions
c
So I have a database with my products on supabase with eg clothing items (pants, shirts, jackets etc). No right now I ofcourse only have a few items to test, but its ofcourse meant to grow to a decent size. Now I'm wondering how I best load these items. Do I load them all at once and store them in a state making for a longer load time, do I load them per catagory when I need them, or do I only ask from the backend what I need every time making a lot more API calls to my backend ofcourse, or something else? Also if someone is familiar with Stripe I'm really starting to break my mind about if I should store and fetch my products from the Stripe site (perhaps making the supabase db obsolete), keep them on supabase and like make a function that handles the migration of them to stripe or the other way around. (I know this might perhaps be some stupid questions)
v
loading them into your database or into your FE app?
c
question 1 - into my front end app question 2 (stripe) - about how to store them in db
v
q1: "depends". i don't think anyone can answer that definitively. q2: i like to keep vendor agnostic, so don't store the products in stripe. i just keep a reference from the DB to stripe's object name.
c
stripe's price id?
Also, how do you handle syncing your 2 supposed databases?