Category "reactjs"

How to load videos from Firebase Storage and return them as React component?

I have a video stored in my firebase storage and and I'm able to access it's download URL from firebase and trying to do this: const App = () => { var vide

How can I get firebase realtime data using unique id

I'm using react js and firebase. I have this code below. I'm using it to get data from another table. const uniqueEventID = Object.keys(data).map((id) => aa

how to remove or delete selected file from React-Dropzone

I have the following code and I am trying to remove or delete a selected file when the x button is press. Currently I am able to upload a image by drag and drop

Pass an Image imported to react Component via props

Happy friday all, Trying to pass an image that I have imported to a react component. My React component: import React from "react"; function profile(props) {

Host name resolution for backend service on Anthos Service Mesh with Istio ingress-gateway

I have a Node/React application that I am running on an Anthos Service Mesh/GKE with an Istio ingress-gateway. Here is my gateway yaml apiVersion: networking.is

ReferenceError: window is not defined, consider using the "jsdom" test environment (jest V28)

I would like some assistance in resolving this error. Am using Jest V28.0.0. Here's how my package.json's test script & devDependencies look like "scri

Can I change the state for given time and then revert it back to the original state using settimeout

I want to get the value to true for one second, after which it will revert back to false using settimeout but stuck. Here is my code: const [value, setValue] =

React fordwardRef with typescript

I have forwarded ref using React forwardRef below is my code: interface PropsDummy {} const ProfileMenu = forwardRef<HTMLInputElement, PropsDummy>((props

React-mapbox-gl: Unable to hook into Mapbox API for adding 3D terrain to a map

I am using react-mapbox-gl in my next application, according to the documentation: onStyleLoad: (map, loadEvent) => void called with the Mapbox Map instance

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