Hey all, I am currently building out a carousel component. Works great with everything as RSC, but now I want to add the ability for a carousel item (image) to be clicked and then open in a modal.
Right now, I am getting a list of photos via the Google Places API. It returns an object that contains photos, with a "name" property that is then used as a parameter in another Google endpoint that then returns the actual URL. Right now, that fetch for the image URL is inside the carousel component (pass in the photos, then for each carousel item that's rendered, fetch the URL and apply to <Image /> component.
Obviously in order to use event listeners my carousel component needs to be a client component, which is fine. But then I run into the issue of needing to fetch the individual images inside of a useEffect, which feels dirty. Is this an anti-pattern, or just a side effect sometimes of wanting to use client components?