Migrate to Vite.js but proxy doesn’t work
I already migrate from CRA to Vite.js for better developer experience.
After that, the proxy doesn’t work.
React + Vite Reusable Component Error: Failed to resolve import Does the file exist?
I’m trying to create a reusable component for my react project (using Vite). For some reason I keep getting the error that it can’t resolve the import. In my dev environment everything seems to be fine (all paths are recognized)
Am I missing a step?
why is my logic to conditionally rendering a loading screen not working?
const [isLoading, setIsLoading] = useState(false); //this is the whole method where I want to use it const joinRoom = () => { const roomKey = roomKeyInput.current.value; if(roomKey == null) return let req = { sessionId: sessionId, socketId: socket.id } setIsLoading(true) axios.post(`${hostName}/join-room/${roomKey}`, req) .then((res)=>{ if(res.data.success){ setIsRoomAdmin(false) setRoomKey(res.data.roomKey) setConnectedToRoom(true); socket.emit(‘connect-to-room’, { roomKey: roomKey }) } }).catch(function (error) […]
Why does vite.js call all the js of my project in the login page?
When the login page is first rendered, a strange thing happens in
Console > Network > JS.
How can I resolve the white screen issue during video transitions in React?
I have a loop of MP4 videos in my React application. However, when I click a button, I want another MP4 video to start playing. But as soon as I click the button, there’s a momentary white screen for about 1 second before the other video starts playing. How can I prevent this white screen from appearing?
How to reference images that get hashed file names?
I have a Vite project, and I’m dynamically building many buttons. I do this by have a JSON file with this information
React.js Deployment Issue: White Screen and MIME Type Error
I am encountering an issue when deploying a project built with React.js (v18.2.0). I’ve been struggling with this for months and have yet to find a solution.
onClick event only fires when double clicked for some components
I’m working on building an Instagram-like story section, and I’ve opted for an event-driven approach, which I’ve named ‘Intercomponent Communication.’ This could also be achieved using the MessagePort API. So far, there haven’t been any issues with other buttons like Next and Previous. However, I’ve encountered a problem with the PlayPause (Toggle) component. It emits the event only after I click twice in some components (When images change), but there’s no issue when I set up two separate events for the PlayPause component, such as onClick and onDoubleClick. I suspect the problem arises due to conditional event emission. One notable difference with the PlayPause (Toggle) button compared to the others is its conditional event emission. I’m happy to provide further clarification if needed. Thanks <3
Problem with proxy in my vite + react.js app
I have a simple application in react.js + vite. I have the api set up on “http://localhost:5000”, and the vite app on “http://localhost:5173”.
The proxy in vite is ignored and I don’t know how to fix it.
I’m working on the shopping cart but I can’t add it yet
enter image description hereenter image description hereenter image description here
Hello
I’m working on adding to cart
The image below is the code I use to add a shopping cart
Please help me see why when I click + to add to cart, all the products are + at the same time
and the product cannot be added to the cart
When I log out, it doesn’t show an object but undefined