Category "reactjs"

Why are cookies not sent to the server via getServerSideProps in Next.js?

Cookies are not sent to the server via getServerSideProps, here is the code in the front-end: export async function getServerSideProps() { const res = await a

JSSIP + React + Asterisk - No audio in Safari

I have set up an asterisk PBX with a simple dial plan that plays the 'hello world' audio when extension 9000 is dialled. I have then created a react application

protected router with react-router v6

this Protected route is works well for profile page. but i want to make a protected route for multiple page. in my project , i want to implement protected route

React + Gsap loop scroll

I just want to know wether someone knows how to create an loop vertical scroll using react and gsap. Thank you in advance!! i tried to use some links but didn't

Deprecation notice: ReactDOM.render is no longer supported in React 18

I get this error every time I create a new React app: Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to

Not able to create theme using Material UI's ThemeProvider and createTheme

I kept getting a failed to compile error: Attempted import error: 'createTheme' is not exported from '@material-ui/core/styles'. Code: import React, { Suspens

Set bootstrap switch component to 'checked' if mode is Dark

I have a theme for my web App in my localStorage and I want to add the checked value to the Switch component if the mode is set to 'dark',or unchecked, if the m

Why isn't the spacebar working in react-quill

I've setup react-quill in my React app, but for some reason the spacebar isn't working. import React from 'react' import ReactQuill from 'react-quill' import 'r

Is there a way to dynamically set className with css module? To be used with CSSTransition library

So I'm trying to use the CSSTransition library in addition to React CSS Module and was wondering if it was possible to dynamically create the className to abstr

How to test scrollHeight, scrollWidth, clientHeight and clientWidth with react-testing-library and jest

I just can't figure out, how I'm supposed to mock / get data from scrollHeight, scrollWidth, clientHeight and clientWidth in test. For better introduction, my t

How to fetch data from dot net core in React Native?

Postman Screenshot of dot net core API Postman fetches the data from my dot net core API but I cannot get the data in React native using the same API. I tried e

Three react fiber OrbitControls ref object throws error in typescript at build phase (code does work)

I am currently stuck on a typescript error regarding the type of a ref object (as far as I know). I am quite new to typescript so i don't understand how to reso

Integrate Google Analytics directly or via Tag Manager?

I am currently building a large NextJS application. I just need to integrate Google Analytics 4 for the client. Should I rather include Google Analytics directl

How can I make collapse/expand for selected tags feature in react-select like props "limitTags" in material UI autocomplete

I am using Select in react-select in order to select multiple values. isMulti options={colourOptions} /> How can I make collapse/expand for select

Request Body Missing in Spring while updating using PATCH API in react js

Spring shows - Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public com.cg.bookstore.entities.

How to purge any persisted state using react tool kit with redux-persist

In the official documentation it says to add an extra reducer in order to purge the state of the current slice, however there is no a clear example everywhere i

Telegram Web Bots data validation in JavaScript

I've tried to do user verification script for telegram web app for bots. I have no idea how to fix it. import sha256 from 'js-sha256' const telegram = window.T

flask jwt extended with status code 401 in React frontend

I am using Flask-JWT-Extended, and Flask CORS with React to make a web app. According to the documents of Flask-JWT-Extended which provide the "Protected" rout

Cannot update a component while rendering a different component warning

I am getting this warning in react: index.js:1 Warning: Cannot update a component (`ConnectFunction`) while rendering a different component (`Register`). To l

Get data in component tree using RTK Query

I think I misunderstand the purpose of RTK Query. Basically I have an app, where I need to login using email and password, this request returns me userId. That