Closed Xoaib007 closed 1 year ago
Hi @Xoaib007,
I think there may be some misunderstanding. The code snippet you've posted belongs to https://daisyui.com/components/carousel/, which is different from the React based version found on https://react.daisyui.com/?path=/story/data-display-carousel--sequential.
The React version appropriately uses a <button>
by default, and allows the user to pass in any custom button they would like to use. The anchor tag makes sense for the non-React daisyui example.
Hi @Xoaib007,
I think there may be some misunderstanding. The code snippet you've posted belongs to https://daisyui.com/components/carousel/, which is different from the React based version found on https://react.daisyui.com/?path=/story/data-display-carousel--sequential.
The React version appropriately uses a
<button>
by default, and allows the user to pass in any custom button they would like to use. The anchor tag makes sense for the non-React daisyui example.
Thanks man, I didnt know daisyui have a dedicated react based version. I've been using wrong thing for almost 8 months :)
Carousel control buttons uses anchor tag which cause re-rendering the page. Which is inappropriate in a single page project with react.