How do I append a component slide in React? #4552
-
Hi, if I wish to append slides and I wish to pass in the
But this obviously does not work as it is expecting raw HTML. My component needs to know if it is currently active. EDIT: I managed to append a static component by doing:
But no event listeners are attached, how should I be attaching the event listeners? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
https://codesandbox.io/s/swiper-react-dynamic-slides-forked-b11r7 |
Beta Was this translation helpful? Give feedback.
-
To link to the issue at large - I was having an issue correctly deleting an element from an array which is why I traveled down this route, which turned out to be the wrong way of going about this. Updated Code Sandbox. To prevent re-rendering of all other array elements, the key of each element must be unique across renders. Fixed by setting the key to be a count, which is strictly increasing. |
Beta Was this translation helpful? Give feedback.
https://codesandbox.io/s/swiper-react-dynamic-slides-forked-b11r7