Category "reactjs"

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

Difficulties rendering 3D avatar with react-three-fiber and React

I'm trying to render a 3D avatar using react-three-fiber and React, but I'm experiencing some difficulties with positioning the avatar. As you can see from from

how to highlight text as per audio on a website in realtime as the audio narrates it

I am trying to figure out which technology to use to hightlight a text as per the audio. Much like what https://speechify.com/ is doing. This is assuming I am

Observe (get sized) control (listen to events) over a nested component in the react and typescript application via the forwardRef function

I have a functional component called MyDivBlock const MyDivBlock: FC<BoxProps> = ({ }) => { {getting data...} return ( <> <div clas

Why my Reactstrap's Media object is not aligned properly?

I have recently started learning to react and reactstrap and I wanted to use Reactstrap's Media Object but my results are not what I want. As shown in documenta

How to render blocks of data from Fetch resource whitout re-render what is already in the screen?

I'm consuming an API, and it returns an array whit length of 370. I want to start rendering only 15, and then, when the user scroll down, render more 15, and so

Nginx Proxy_pass / redirect to fixed url

I created a simple react app to serve as an error page (might be a bit overkill). The idea is that we can easily customize the errors via query parameters or UR