Category "reactjs"

Firebase deploy issue

I am learning web development. At now I'm practicing some react projects with firebase authentication. But after finishing the deployment, I'm only getting this

app.post('\pageNameOrCanBeAnyRandomName')?

I have a page called createEmployee.js which includes 2 functions (fetchData and createNewEmployee) ... see below: const fetchData = async() => { c

Playing background music in a React app using Howler

So im using Howler to play background music when my React app is loaded. So I store ID of the instance of Howler(i.e is responsible for background music) using

Create Infinite Scroll with react typescript

How do I create a infinite scroll that detects when we reach the bottom of the page but with typescript

How to run npm start without opening browser for react development on linux

I am learning react and find myself running npm start on the terminal a couple of times but its annoying how it opens a new browser window everytime. I'm tryin

React - prevent calling useEffect for the first mount [duplicate]

I want to prevent calling my useEffect on the first mount. how can I do this? I want the best practice. I don't want to use if condition impor

`react-query` mutate onSuccess function not responding

query, I'm making a bulletin board right now. So, I put the values ​​of title, content in the Form information into the react-query function onSucce

Get scroll position with NextJS

I want to know if the user has scrolled or not to update the UI in NextJS. I have the following code, all the examples I have found have the same code: const

Render new react component based on API fetch

I'm trying to create a React app that will render components based on an API response (fetching topics title, description and the same for the courses that belo

Uncaught (in promise) Error: No ethereum object at checkIfTransactionsExists (TransactionContext.jsx:105:13)

Here is my TransactionContext.jsx TransactionContext.jsx:105 Uncaught (in promise) Error: No ethereum object at checkIfTransactionsExists (TransactionContext.js

HLs.js stuttering audio stream on Safari only

I am using Hls.js to stream live audio for radio, and it works well on chrome but the audio is stuttering on Safari only. Here is the code sandbox example(kindl

Flex inside flex causing orientation issues

I am new to Web Development and React (and fairly amateur at CSS), so there must be some fundamental issue with my understanding of how flex works. With referen

In react class based component this.setsate is used but state is not defined in constructor if I have to convert this in functional based then how

class Dashboard extends Component { constructor(props) { super(props) this.state = { assetList: [], assetList1: []; } } componentD

How to deploy Spring boot and React application together on GCP App Engine?

I don't have any experience in deployment and trying to deploy Frontend and backend together. I am able to successfully deploy the spring boot application. I fo

how to fix 404 not found error nginx on docker?

I'm trying to make docker file run in to react app.react app all ready successfully deploy but page reload get an error 404 nginx error. this is my docker file

TypeError: _API.default is not a constructor with Jest tests

I have an API class that I am trying to use in a React app. // API file class API { ... } export default API; // Other file import API from "utils/API"; con

Creating a centered carousel with react-alice-carousel

I have struggled the whole day to create a centered carousel with react-alice-carousel library and the results are those. Link to the library here Basically I a

What are the difference between useInfiniteQuery vs QueryClientProvider usage in React Query?

So I've encountered a confusion on the preferable usage of QueryClientProvider and useInfiniteQuery. I've been using the useInfiniteQuery function as a global s

"Module not found" when migrating to Webpack 5

I am trying to migrate my React app to webpack 5.72.0 (from 4.42.1). So I also have webpack-cli (4.9.2), webpack-dev-server (4.8.1) and babel (7.17.9). My probl

TS2322: Type 'Count' is not assignable to type 'ReactNode'

I am new in react and TS and I need help I am trying to use useState with typescript import React,{useState} from 'react' interface Count{ count: number } co