Category "reactjs"

How do I save responses from an API to a state so that I can display old searches/responses?

Here's what I'm trying to do: First, I want to display the response I receive from the API (I can do that), but then I want to display the previous prompts and

Performance improvements for split screen with scroll overflow

Edit: Turns out the performance problems only happen during development. Once Gatsby builds the project, everything runs well. I'd be curious to hear if anyone

Cannot shallow render a component using IntlProvider

I have the following component, using Flow: //@flow import React, { type Node } from 'react'; import { useIntl } from 'react-intl'; type Props = { balance: Ob

what is the type of i18next " t " variable (TYPESCRIPT)

I use i18next and I want to pass the t function prop to my interface. exp: const { t } = useTranslation(); export interface ITranslate { translate: ... type

Serving react static files in golang gin-gonic using go:embed giving 404 error on reloading on frontend URL

I have built a go application using gin and go1.17. I am using go:embed to to serve static content for a SPA app built using react. (trying the approach as sugg

how to prevent getting multiple responses in Axios react native?

I want to get data from database. the function CurrentUserId get the details of the current user. i need to get data using GetTemplate function the problem is t

Type 'AppOneType | AppSecondType' is not assignable to type 'AppOneType'

This is my current code structure: interface AppOneType { ... } interface AppSecondType { ... } interface HomeType { data: AppOneType; } interfac

How can I automatically import an icon which fetches from the server in NextJS?

I want to dynamically generate a page in the Next-JS app. Inside this page should be imported automatically Icons which fetches from the server Instead of writi

What's the error "Objects are not valid as a React child (found: object with keys {_id, name, img, des, price, quantity, sName})."

I don't understand why I'm getting this error. I want to understand what's wrong with the following code. const Book = ({ book }) => { const navigate

window not defined build error on react-editor-js

As mentioned in title I'm facing the error when I'm trying to build. When I run npm run on my machine with below fix, I get the editor working, but when I'm try

next-auth only valid absolute URLs can be requested

I updated [email protected] to [email protected] for okta signin(reactjs). After that I am getting the following errors: [next-auth][error][SIGNIN_OAUTH_ERROR] htt

How to modify material UI datagrid checkbox icon?

Here is the codesandbox. I want to use my customized checkbox in the Datagrid. So I would like to change the first column checkbox to a round checkbox. I alread

Understanding React's Key Property Outside Of Arrays

I encountered this behaviour in React and don't understand what is going on exactly. Say I have two select elements, the first is controlled by React, and the

Property 'isMounted' does not exist on type 'ErrorBoundary'

I'm practicing typescript and I've run into this bug that won't let me move forward: Property 'isMounted' does not exist on type 'ErrorBoundary'. I have the fol

toContainHTML providing an error when HTML element exists (React Testing)

todoElement is supposed to contain a strike element but my test says otherwise. I've declared in my Todo function that if text is completed then it should rende

Next.js router.query getting undefined on refreshing page, but works if you navigate to it from Link component [duplicate]

Why is router.query empty when I refresh a page with the correct id in the URL, but when when I navigate towards it through , it works? say I

How can I re-distribute values within a charts.js pie chart when a legend item is turned off/on?

I have distributed the data across the pie to equal 100% in total ( I think lol ) please verify that's correct if you don't mind. But I want to be able to re-di

How to handle Deep Linking with Auth0-react SDK

I'm using Auth0-react sdk, which is the newer version of the react-auth0-spa.js. I'm trying to redirect the user to the original URL enter in the browser before

How to disable eslint errors showing in the browser

When I run my create react app application using npm start, the eslint errors are shown in the browser on top of my site. I expect to see these warnings and err

npm ci passing locally but failed on gitlab

Getting this error during npm ci command, but it is working fine locally (tried removing node_modules and running npm ci to reinstall it, no errors) $ npm ci np