Category "reactjs"

How to prepopulate a react formik form

I have a table tha stores Students with an edit buttom tha opens a formik form. const EditStudentFrom = (props) => ( <Formik initialValues={{s

I want to enable crypto payment on my site [closed]

I want to enable crypto payment by giving the customer an wallet address and the send the amount of crypto to my wallet lets say 10USDT but I

React Testing Library with userEvent.click wrong act() warning

I have several tests written with Jest and React Testing Library. They all mock fetch and use a userEvent.click call to fire a submit button which makes a fetch

how to use "leaflet-buffer" in react-leaflet?

I want to buffer the shapes I drew on the react-leaflet. But I can't find any npm library to react like "leaflet-buffer". Please help me.

Frontend/Backend Serving on Ubuntu Server 20.04

I am working on my first web-project and therefore use an Ubuntu Server 20.04 with apache2. Now i struggle with the correct frontend/backend-serving of my websi

why am i not getting the data from Rapidapi

i want to use rapidapi to get some data using redux, but when i console.log the data i will be getting GET https://coinranking1.p.rapidapi.com/coins/coins 401

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