React - Tabs dynamic rendering not working!

How to make the Tabs component work when it is rendered after loading the data in the API?

@nolimits4web, Any suggestion?

here => wild-field-5n4p14 - CodeSandbox

I noticed that according to your example code, all I needed to do was add a key attribute to the “Tabs” component for it to work. However, it doesn’t work very well when the “Tabs” have the “swipeable” property. To make it work properly, I had to execute the following code:

tabsRef.current.el.swiper.updateSlides();

Here’s a picture of the complete code:

In other words, your example only works when “Tabs” are not “swipeable”.

Anyway thanks a lot for the answer!
It helped me to better investigate what was going on.