Category "reactjs"

How to pre-download items from a JSON list array in React JS?

Here the Codesandbox example. I have a list array of songs: const tracks = [ { name: "Sunny", src: "https://www.bensound.com/bensound-music/

What are my options to deal with this stale closure in React besides using ref

I'm using the library React Datasheet Grid, the main component has a property called OnActiveCellChange, to which i'm passing my custom function: const [selecte

How to custom search bars in Ant Design ProTable

Currently, I am using table of antd ProTable. I want to divide a column into two smaller ones, and each should has its equivalent search bar. However, it only s

How is the video stream still making it to the peerConnection although I disabled it?

I'm working on a peer to peer webrtc project using react, hooks, and redux. When I make modifications such as disabling the video, I don't see it on the local v

How to add random minutes like first slots should be 30 minutes and then 1 of 15 minute slot and again 30 minute slot

const eventClick = (args) => { let StartTime = moment(args?.event?.StartTime, 'HH:mm ') let EndTime = moment(args?.event?.EndTime, 'HH:mm ') if (

How to make Categories button functional

I got my current website displaying hard coded data from my data.js file. I implemented firebase as my database and I want to have my categories button work wit

Insert tab character into SlateJS text editor

How to insert tab characters into SlateJS? So inserting   is a tab character, however, when inserting this as text, it appears as the literal character

React / Rails / I18next change language in URL or refresh server-side props

I'm using React with Rails. I get some props from a React controller when rendering the page initially. When changing the language on the frontend (I18next), we

How to pass const value from one react js file to another?

I am a little new on react. How can I pass a variable with its value from one react js file to another? File A.js: const [value, setValue] = useState(35) Fil

ReactJS - Convert to Array Mapping

How can I convert this link to a array mapping, I already tried making a array object with name, path, icons, and label properties. But when I do that the cart

State lost value in bootstrap table

I am using custom fields in react bootstrap table. { dataField: "hours", text: "# of Hours", sort: true, footer: "# of Hours", headerStyle: (colum, c

TypeError: Class extends value undefined is not a constructor or null while using stream-browserify

While using stream-browserify to import Transform class and extend it in the code causing the following exception in the browser console AudioUtils.ts:52 Uncaug

Trying to refactor React App to React-Redux issue w/ volume slider

I've been doing freecodecamps Drum Machine app. I was able to complete the app completely with React but I made a copy to try and get familiar with using react-

React - .map returning not a function?

I was following this example: https://reactjs.org/docs/faq-ajax.html But my code is returning weather.map is not a function? function App(props) { const [wea

Why does a checkbox get checked after another checkbox above gets removed?

I have an array of my clients' pending requests that I iterate through, creating a div with relevant information for each pending request. Within each div, ther

code ERESOLVE when running the command npm install

I'm new to ReactJS and tried to run a code in VS Code using npm install command and this error pops up: npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resol

How to make radial gradient bubble chart in Plotly

Cannot create Radial Gradient effect and shadow in Bubble Charts

How to define common query params in Redux Toolkit Query

All the endpoints of the API I'm working on, require the same set of query parameters. The user must select these parameters before making requests to endpoints

How to display auth errors with p tag

how to display to user an auth error differently than with alert? For example: User will type a bad password, and a p tag will tell him, that he typed uncorrect

React Modal on deletion of a row in React-Bootstrap-Table-next

I have been trying to implement a modal that will pop up to confirm deletion before a record is deleted in my bootstrap table. I have tried different methods bu