Answer the question
In order to leave comments, you need to log in
React + Redux: How to use the same component multiple times at the same time?
Let me explain. There is a page, let's say a component is called on it three times, which should show a different set of the same type of data each of the three times. Let's say it will be three different lists of companies. The component is connected locally, in the sense that its state is managed at the level of this component, through the decorator @connect
. The code for the parent component is something like this:
<main className="main">
<Promo />
<Companies
type="type1"
/>
<News />
<Testimonials />
<Benefits />
<Companies
type="type2"
/>
<Sections />
<Companies
type="type3"
/>
</main>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question