All questions

How do I pass my own variables into a slot with useContent in React?

Asked by rin on

Rrin

the content a slot returns needs to depend on a value my component already has, like the plan tier or a category. I would rather feed that straight into the fetch than round-trip through a profile write first.

Small example of what I have:

const content = useContent('pricing-hero'); // want this to depend on `tier`

How do I pass tier in so the audience that picks the content can see it?

Was this helpful?

0 answers

Still have questions?