Category "reactjs"

Render a react component in a new window

I am developing a Certificate Management System where after all the processes have been done, the user may print a certificate. I am struggling to implement suc

Configure Nginx as Reverse Proxy for Nodejs App on Jelastic

I've tried using standard nginx and nodejs configurations following many documentation, but unlike other tutorials there are several files that don't appear in

useSWR doesn't work with async fetcher function

I am using SWR to fetch data to populate a table with. I am using the following code: const { data: items, error } = useSWR(fetchAllItems.name, fetchAllItems)

getting error when sending files to backend react node js

I am getting error of undefined when i send a file from react to backend, i am unable to understand the error. i am sending a image which will be uploaded in cl

How to format reference line in lightweight charts?

How to format reference line in lightweight charts? Following is lightweight chart. As you can se the horizontal line market (US$449,308,044) is taking so much

Chakra UI icon not positioned inside Input

I'm trying to position an icon correctly in the middle of an input, where that input has size="xs". However, all my attempts have failed, and the icon keeps bei

Refresh React useAuth0 user after API user data update

I have a web React application accessing users data through useAuth0 hook (from npm auth0-react package). In the profile page, I permit the connected user to ch

I am getting "'navBar' is defined but never used no-unused-vars" warning .How to solve it? (React App)

import './App.css'; import Search from './components/HomePage/SearchBar'; import navBar from './components/common/Header.js'; import footer from './components/c

How to set global property for react using esbuild

According to the docs using define is the suggested way of setting the env properties for a build. When I run my app with I get a process is not defined error.

How to correct VS Code terminal pointing to wrong folder C:\Windows\System32\WindowsPowerShell\v1.0?

I try to open a React project path in terminal window using VS Code's Open in Integrated Terminal (Ctrl+Shift+`), but it sets C:\Windows\System32\WindowsPowerSh

SWR not working properly with async fetch

Recently updated SWR - now for some reason my data is not fetching properly. const { data: expressionsData, error: expressionsError } = useSWRImmutable(

At what point does it make sense to start using virtualization to render data?

I'm using React to build a simple website and I often hear people say that they use virtualization to render lists of items (eg. products on a retail website).

Is there any solution to fix this Cors error?

I have made an api from django but when I call from my react app It gives CORS error my settings.py INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.

Fetch API in DatoCMS doesn't bring all the published posts

I want to fetch all my published blogposts from DatoCMS. Actually, I'm doing this. The problem is that it only brings 65 when I have more than 100... does anyon

Deploying Out folder in NextJS 12.1.0

Before the new version 12.1.0 of NextJS when i ran the command run build && export i would get this Out folder, which I could upload to any host, for e

Why browser is not setting the cookie sent from my node js backend?

I'm trying to set a cookie from the backend server running at "api.mydomain.com" like this to the frontend running at "mydomain.com". res.cookie('auth', tok

How to trigger animejs on a specific Swiper slide?

You can see my code using this sandbox: https://codesandbox.io/s/strange-shtern-e98gvu?file=/src/App.js Basically, what I want to do is play the animejs animati

Access data already fetched with react query in other component

I'm new with React Query, and I have a question, I've being looking on the documentation but I can't find how should I access the data that is already fetched w

Getting : Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

I have got such error while want to fetch data from database . Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

MockServerWorker is not handling responses when using fetch in react

I'm doing test driven development in react course - I'm trying to development test for post request. Below is by react code. import React from "react"; import a