Category "reactjs"

How to maintain script tag position on webpage?

I am using a script tag to add a widget to my Next.js app. I have create a section component for this widget but when I run the app it renders below my footer b

Electron cache images and then read it when the image is used

When electron starts, the cache images is read, and then read it when the image is used. i can save images in main process. fetch(`${server_host_ip}${image}`)

get error Cannot find module '/app/app.js' when start NextJs on docker

I have a project on docker developing by nextjs and laravel. The project runs successfully on my laptop but when I try to run this project on another sustem wit

React prevent MUI Select from changing width in MUI Grid

I have an MUI grid setup with a variable number of columns. Currently, if the user selects a long string for the Select box, the Select grows, increasing the si

React Draft Wysiwyg dropdown options not working

I am facing issue when implementing React Draft Wysiwyg, font, size, bold and other dropdown options not working this is my code import React, { useState } from

Make cells in table editable react-virtualized

So I created a large list and I can get it to display and all that, but I need it to be editable.... so far I've tried: putting in an html input tag, which does

does the IndexedDB Wrapper Dexie.js support all kinds of Web browser?

I'm planning to use IndexedDB Wrapper Dexie.js for my react.js application. Does Dexie.js support all kinds of web browsers? If there is any limitation, kindly

What Is The Right Way to Call A Google Cloud Function via A Next.js (with Typescript) App?

The component that I have doing an API call looks like this: import React from 'react'; import { Button } from 'react-bootstrap'; class Middle extends React.Co

React-query returns Cannot read properties of undefined even though I can see id is set

I am trying to learn react-query and been following quite a few guides. However everytime I try with parameters something goes wrong. This code that I have unde

flex row exceeding page width, text-overflow: ellipsis not working

my apps flex capabilities have changed since adding some code. In my MovieContainer ideally I want the flex-direction to be row (it's currently set to column) a

Material-UI-Search Bar value not clearing

I am using the @material-ui-searchbar to filter data. I'm using the same container for multiple different pages to display the info. When ever I switch between

Error: Unable to load application: NameError: undefined local variable or method `controller_path' for Object:Class - When pushing to Heroku

beginner here learning how to push a project to production. I am pushing my ReactJS app that has a server side and client side to Heroku and have the following

Memoized functions to custom hook not picking up updated value from hook

Given a small hook defined as const useCount = ({ trigger }) => { const [count, setCount] = useState(1) const increment = () => setCount(count => c

React Router working on local but not work on real server

**When i try at local route is working but why not working on product ? i get 404 not found error. ** const App = () => { return ( <>

Fill treeview from custom array of objects. Recursion call

I'm using treeview to display my hierarchical data. I have following array of objects: const data = [ { id: 1, hierarchyid: "/", level: 0, name: "Mhz" },

Can anyone explain why my JavaScript map function displays two extra posts upon page refresh? Getting weird duplicates with and without errors

Hello friendly people of stackoverflow, I'm having a map function issue and I just can't put my finger on what the problem could be. Context is just for user da

Is it recommended to pass setters from useState as props?

I am currently in a coding bootcamp and the instructor told me that it is not best practice to pass the setters defined in my useState as props to children comp

Error: Can't resolve 'fs' in node_modules\dotenv\lib' in React web app

I installed dotenv using npm install --save dotenv in my React web application. Whenever I use require('dotenv') this error comes up. Error: Can't resolve 'fs'

React setState componentDidUpdate React limits the number of .. when trying to update the state based on updated state

i have react program that need the data from other components. When the parent components send path data, an array will get all of the files name inside folder,

Why React Component render many time when get event from socket.io?

I am using socket.io for my project social network web, when user connect I join, but when I get message from socket.io by group chat, My component render messa