Answer the question
In order to leave comments, you need to log in
How to forward one component to another?
There is a slider with pictures, and I want to forward not img (which cannot be done by default), but for example already a card with goods and, for example, other props. But I do not understand how it is how to forward through props. How can it be easier to solve. https://codesandbox.io/s/ly8vp183p9
Answer the question
In order to leave comments, you need to log in
const ItemComponent = props => (
<div>
<p>{props.title}</p>
</div>
);
...
<Carousel
items={items}
ItemComponent={ItemComponent}
/>
You can drop a component like this
<Carousel>
<div>
<p>text</p>
</div>
</Carousel>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question