Category "reactjs"

How to add spinner for loading to fetch API from MongoDB?

Custom hook .js import { useEffect, useState } from "react"; const UseHook = () => { const [items,setItems]=useState([]); useEffect(()=>{

when I use setTimeout for show user is typing or not then its working but its blinking when I am typing continuously

I am using setTimeout and its working but when I am typing continuously then also its blinking How I can solve It ? messageHandler(ev) { const message =

Socket.io Client repeats event action multiple times from one emit

I am creating a simple diffie hellman demo with sockets and it seems that whenever my server emits any event, the client repeats it multiple times. For example:

reacr ssr template won't run : help fix code base

This is an attempt to demo how to utilize react ssr however it is not functional. See git repo and I appreciate any insights or PRs to fix the issues. Clone wit

Display Fetched Data from API in react and display in responsive table?

I try to make a responsive table to display fetched data from API in react.js. I designed a table but it is not responsive. <TableContainer > &l

Tailwind CSS custom gradient with React state and FastAverageColor

I'm trying to add a custom gradient over an image using React state, Tailwind CSS and the FastAverageColor package (https://www.npmjs.com/package/fast-average-

Why logout navlink doesn't work with localStorage?

I'm trying to use localStorage in order to connect/disconnect users on my website. I tried to manage this with a condition on click on the navbar (it concerns t

Electron-React error: I keep getting undefined error while reading 'ipcRenderer'

I am trying to create a desktop application using Electron and React. I set the basic settings using electron-react-boilerplate. https://github.com/electron-rea

React Beautiful DnD, multiple columns inside single droppable

I am trying to have a grid column layout, (2 columns) inside a single droppable container. The project is for an online menu where you can create a menu item, w

Getting null when I use context.query with getServerSideProps() in Nextjs?

Intro Basically, I am building an e-commerce website. But I got stuck in this problem while saving the order details after I click payment button (although I ha

Add responsiveness to reactjs landing page

We have large react application without using any UI framework, we build all UI component our own. Now we need to make landing page portion responsive (it's par

How to show the value of an foreign key in the frontend?

I want to show the value of injurydiseases in the frontend of Animals AnimalModel.js injurydiseases: { type: mongoose.Schema.ObjectId, ref: 'injurydisea

How can i change Header Bar height in react native?

i'm trying to change Header Bar height in React-Native Stack Navigator this is my code I tried to put headerStyle: height:'100', but it doen't work what should

Don't show live video from camera when deploying to domain @cycjimmy/jsmpeg-player

The problem I had when developing to a domain. On localhost although it was running fine, when deployed it didn't work. Whether the connection to ws://domain/ap

react toastify does not work it gives a div as it output

**as you can see i am trying to show toast by using toastify and i install it but still it not working and it gives a div when it render** import React, { useR

What's the difference between Redux Toolkit Query vs. Redux Toolkit

What can Redux Toolkit do, or do well in that RTK Query can't? I know that RTQ Query makes it easier to perform data fetching and caching with less code, but wh

React render function doesn't render the returned components

When I execute npm start, it opens localhost:3000 but doesn't display anything, just a white page. Then, I tried to insert a paragraph inside <body> in in

localStorage.getItem() doesn't retrieve data on page refresh - ReactJs (TypeScript)

I'm trying to create a to-do list app with ReactJs, working with localStorage the setItem() works fine but the getItem() doesn't return anything except empty ar

How can I redirect login to current page in react js?

I create a single page application using react. I create protected route but after login, I can access login page after login. If I try to go login route I can

Can't find specific single user email query in Mongodb database?

API response show all user data in database to website UI const [product, setProduct] = useState([]); const [user] = useAuthState (auth) useEffect(() => {