1

I am working on a React Project with Tailwind CSS. For a carousel requirement we are using Flowbite. On adding the sample carousel code from their examples it does not work. When the page is reloaded the carousel shows up and works as expected. if you navigate to a new page and visit back the carousel page the images dont show up and carousel does not work. We are using react router dom. Any idea what could be causing such a behavior.

Joy
  • 105
  • 1
  • 2
  • 10

2 Answers2

0

I had the same issue (using it with Vue3+Nuxt). I solved it by placing the initCarousels call inside a setTimeout, in the onMounted hook. Hope this solves it for you too.

alec_lloyd_probert
  • 124
  • 1
  • 2
  • 12
0

Today I had the same problem using Next.js, my mistake was installing the standard library and not the installation indicated for Next.js. After replacing it immediately, the problem was solved.

Below is the documentation to install in react, and how to create flowbite-react components:

Harsha Murupudi
  • 579
  • 1
  • 6
  • 19
Victor
  • 1
  • 1