I need a second 🧠. API: Should I load a list of content with fetch, or render it server-side?
Unanswered
Exotic Shorthair posted this in #help-forum
Exotic ShorthairOP
I have a list of video "segments" on a page (see image). Currently I have a static list of segments in the UI for front-end dev purposes. The array lives on the segments page, feeding into the segment list client-side component.
Should I just render that array server-side when the data source is ready?
OR:
Should I make an API endpoint and load via fetch?
I know that the API will be handy for POST, PUT, DELETE, yet the GET has me at a fork in the road. I like the idea of trying out the endpoint for GET, yet maybe I don't need it.
Curious on your best practice thoughts?
Should I just render that array server-side when the data source is ready?
OR:
Should I make an API endpoint and load via fetch?
I know that the API will be handy for POST, PUT, DELETE, yet the GET has me at a fork in the road. I like the idea of trying out the endpoint for GET, yet maybe I don't need it.
Curious on your best practice thoughts?
1 Reply
Exotic ShorthairOP
I read more about the options. I think I'm going to keep the get request in place as it's not important for SEO and could update often.