Next.js Discord

Discord Forum

applying useContext to a specific iteration

Unanswered
Great Skua posted this in #help-forum
Open in Discord
Great SkuaOP
I have this code:
      {servicesTypes.map((filteredServices, index) => {
        return (
          <ServiceCardsSection
            key={index}
            sectionTitle={sectionTitle[index]}
            services={filteredServices}
            allServicesNamesExceptMySubscriptions={
              allServicesNamesExceptMySubscriptions
            }
          />
        );
      })}

The 'allServicesNamesExceptMySubscriptions' needs to be applied only to one serviceCardsSection.
How do I do that properly?

0 Replies