Category "reactjs"

React: How to autoplay video on all devices but prevent it from launching full-screen on iPhone

I have a React website that autoplays videos on desktop. However, autoplay causes it to not only autoplay, but launch full-screen autoplay on iPhone (I tried Sa

How can I configure Apollo to always ignore its cache and fetch directly from the GraphQL server?

I am developing a React UI that makes use of a GraphQL API I have written (using Hot Chocolate and ASP.NET 6.0). I have just started coding the UI project and a

React Router Outlet and Protected Outlet does not working

I want to render outlets based on user login state. The problem is the oulet never get rendered. Only parent element is rendered.I tried using "/:username/board

How to prevent sending cookies from UI using react to backend for selective apis

In our application , there are certain cookies related to analytics etc which are being sent as part of every request api from frontend, we are not explicity se

How to hide the legend in chart.js in a react project?

I am trying to hide the legend of my chart created with Chart.js. According to the official documentation (https://www.chartjs.org/docs/latest/configuration/leg

Recharts Treemap Tooltip label

When creating a TreeMap with <Tooltip/> how do i get a label in the tooltip? I'm only getting tooltips like : 5738 In the treemap itself the names are di

Which one should be used in React, l10n or i18n?

I have a webpage in React and I wanted to use l10n (localization) but only find information about i18n (internationalization), so I don't know if l10n exists fo

How to initialize data using map inside useState in ReactJs?

I'm new to React and in the assignment I'm working on, I have to show data in a AG Grid table. For that this is how I'm initializing rowData inside useState(),

How to add a new prop to MUI component with TS Augmentation

I'm using MUI v5 and I'm trying to add a new prop to the TableRow componenent. MUI documentation on module augmentation lacks some examples, since it only shows

list all token IDs by owner at ERC721

I have a simple ERC721 smart contract used for testing purposes, I was wondering if it is possible to query the token IDs a specific wallet owns in that smart c

create-react-app application becomes non-interactive after fast refresh

I have noticed that with the latest version of create-react-app ([email protected], also had this problem in the latest @4.x.x version) the page becomes non-i

Reaction not being triggered by nested observables

I have a observable class with nested observable properites: class TodoItem { @observable name: string = ""; @observable completed: boolean = false; @act

React Native Picker Change Overlay Color And Prevent Text Cut

currently i'm using https://github.com/react-native-picker/picker library But i got some problem, my placeholder text is cutted and i want to change the overlay

how to connect trust wallet and metamask in react with ethers.js

I am going to connect with trust wallet on mobile and metamask on computer in react. but now I can only connect with metamask. I want to connect with trust wall

Jest test for a copy to clipboard method using react with typescript

I am trying to ensure that the right value is copied to the users clipboard when they click a button. This is my copy method. I am using a ref on the input to a

Firebase error: No firebase app default has been created

I am making a food delivery app using react-native and redux. I want to fetch the data from the firebase store and for that, I have written a function in the ac

React Jest:- node:internal/process/promises:246 triggerUncaughtException(err, true /* fromPromise */);

I have below code in react. useEffect(() => { (async () => { await httpClient .get(`${config.resourceServerUrl}/invent

Loop or map array inside the JavaScript object

I have an array of javascript objects like: const arrayData = [ { name: "campaign 1", date: "2022-05-13", milestones:[{name:"Planning", targetDate: "2022-05-25"

ReactJs Socket Client doesn't receive data from Flask Socket using emit(... , to=room)

I'm trying to develop a real-time chess app with Flask socket-io and ReactJs. My problem is that when setting emit(..., broadcast=True) on the server-side, the

How to resolve this reference error : Audio is not defined

Problem I'm trying to play some audio files in some specific situations. e.g) When users access to login page, the audio plays 'Please enter your phone number'