Relative Content

Tag Archive for reactjsvite

Hamburger Menu always appears when reloading the page

I want to create a hamburger menu for a website for small screens, I use useState to set a variable to false by default then making an onClick function for a button which changes the useState variable and toggling the div with the menu items hidden and visible. The problem is although I have made the variable false when the page is reloaded the menu appears is there something I could do to fix that or should I go about this in another way.

Hamburger Menu Vite React Tailwindcss DaisyUI

I want to create a hamburger menu for a website for small screens, I use useState to set a variable to false by default then making an onClick function for a button which changes the useState variable and toggling the div with the menu items hidden and visible. The problem is although I have made the variable false when the page is reloaded the menu appears is there something I could do to fix that or should I go about this in another way.

error during build: RollupError: Expression expected

I am meeting an error while build react with vite app for production . However it working npm run start without issue.
I’ve ensured that all dependencies are up to date and that the configuration settings align.