Closed 13RTK closed 2 months ago
Responsive NavBar with collapse does not work in React + Vite
Tech stack: React | Vite | JavaScript (without react router)
My steps:
The very strange thing is that the same code is working well in my Vue + vite project, so I can make sure my tailwind config is correct😅
This is the vue demo
https://stackblitz.com/edit/vitejs-vite-hf7tig?file=src%2Fcomponents%2FNavBar.jsx
The collapse should popup like the demo in preline doc
Even when I click the button, the collapse still does not popup like official docs does
No response
@13RTK Hi, Please check out the demo for React on Stackblitz, which is specifically setup for the Vite. I also forked the demo you provided and tweaked it.
@olegpix Thank you for your patient response, the problem is that I missed the script:
Summary
Responsive NavBar with collapse does not work in React + Vite
Steps to Reproduce
Tech stack: React | Vite | JavaScript (without react router)
My steps:
The very strange thing is that the same code is working well in my Vue + vite project, so I can make sure my tailwind config is correct😅
This is the vue demo
Demo Link
https://stackblitz.com/edit/vitejs-vite-hf7tig?file=src%2Fcomponents%2FNavBar.jsx
Expected Behavior
The collapse should popup like the demo in preline doc
Actual Behavior
Even when I click the button, the collapse still does not popup like official docs does
Screenshots
No response